diff --git a/DB2.LinqService/Tests/Linq/IdentifierTests/Tests.Linq.IdentifierTests.TestAliasLengthName_Latin(DB2.LinqService).sql b/DB2.LinqService/Tests/Linq/IdentifierTests/Tests.Linq.IdentifierTests.TestAliasLengthName_Latin(DB2.LinqService).sql new file mode 100644 index 00000000000..f551688a1dc --- /dev/null +++ b/DB2.LinqService/Tests/Linq/IdentifierTests/Tests.Linq.IdentifierTests.TestAliasLengthName_Latin(DB2.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW + +SELECT + "abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd"."FirstName", + "abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd"."PersonID", + "abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd"."LastName", + "abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd"."MiddleName", + "abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd"."Gender" +FROM + "Person" "abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd" +WHERE + "abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd"."PersonID" = 1 + diff --git a/DB2/Tests/Linq/IdentifierTests/Tests.Linq.IdentifierTests.TestAliasLengthName_Latin(DB2).sql b/DB2/Tests/Linq/IdentifierTests/Tests.Linq.IdentifierTests.TestAliasLengthName_Latin(DB2).sql new file mode 100644 index 00000000000..f551688a1dc --- /dev/null +++ b/DB2/Tests/Linq/IdentifierTests/Tests.Linq.IdentifierTests.TestAliasLengthName_Latin(DB2).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- DB2 DB2.LUW DB2LUW + +SELECT + "abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd"."FirstName", + "abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd"."PersonID", + "abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd"."LastName", + "abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd"."MiddleName", + "abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd"."Gender" +FROM + "Person" "abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd" +WHERE + "abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd"."PersonID" = 1 + diff --git a/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue2145Test2(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue2145Test2(Informix.DB2.LinqService).sql new file mode 100644 index 00000000000..fc321a693f3 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue2145Test2(Informix.DB2.LinqService).sql @@ -0,0 +1,36 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 +( + ID, + FirstName, + LastName, + MiddleName, + Gender +) +AS +( + SELECT + t1.ID, + t1.FirstName, + t1.LastName, + t1.MiddleName, + t1.Gender + FROM + ( + SELECT 10::Int AS ID, 'FN1'::NVarChar(255) AS FirstName, 'LN1'::NVarChar(255) AS LastName, NULL::NVarChar(255) AS MiddleName, 'M'::Char(1) AS Gender FROM table(set{1}) + UNION ALL + SELECT 11::Int, 'FN2'::NVarChar(255), NULL::NVarChar(255), NULL::NVarChar(255), 'F'::Char(1) FROM table(set{1})) t1 +) +SELECT + p.FirstName, + p.ID, + p.LastName, + p.MiddleName, + p.Gender +FROM + CTE_1 p +WHERE + p.ID = 11 + diff --git a/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3360_DoubleColumnSelection(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3360_DoubleColumnSelection(Informix.DB2.LinqService).sql new file mode 100644 index 00000000000..6ce0bdbf293 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3360_DoubleColumnSelection(Informix.DB2.LinqService).sql @@ -0,0 +1,227 @@ +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS Issue3360Table1 + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS Issue3360Table1 +( + Id Int NOT NULL, + Byte SmallInt NOT NULL, + ByteN SmallInt NULL, + Guid VARCHAR(36) NOT NULL, + GuidN VARCHAR(36) NULL, + Enum NChar(11) NOT NULL, + EnumN NChar(11) NULL, + Bool BOOLEAN NOT NULL, + BoolN BOOLEAN NULL, + + PRIMARY KEY (Id) +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Byte SmallInt(2) -- Int16 +SET @Byte = 0 +DECLARE @ByteN SmallInt -- Int16 +SET @ByteN = NULL +DECLARE @Guid Char(36) -- StringFixedLength +SET @Guid = '00000000-0000-0000-0000-000000000000' +DECLARE @GuidN Char -- StringFixedLength +SET @GuidN = NULL +DECLARE @Enum Char(11) -- StringFixedLength +SET @Enum = 'ENUM1_VALUE' +DECLARE @EnumN Char -- StringFixedLength +SET @EnumN = NULL +DECLARE @Bool Char(1) -- StringFixedLength +SET @Bool = 'f' +DECLARE @BoolN SmallInt -- Boolean +SET @BoolN = NULL + +INSERT INTO Issue3360Table1 +( + Id, + Byte, + ByteN, + Guid, + GuidN, + Enum, + EnumN, + Bool, + BoolN +) +VALUES +( + @Id, + @Byte, + @ByteN, + @Guid, + @GuidN, + @Enum, + @EnumN, + @Bool, + @BoolN +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 2 +DECLARE @Byte SmallInt(2) -- Int16 +SET @Byte = 1 +DECLARE @ByteN SmallInt(2) -- Int16 +SET @ByteN = 2 +DECLARE @Guid Char(36) -- StringFixedLength +SET @Guid = 'bc7b663d-0fde-4327-8f92-5d8cc3a11d11' +DECLARE @GuidN Char(36) -- StringFixedLength +SET @GuidN = 'a948600d-de21-4f74-8ac2-9516b287076e' +DECLARE @Enum Char(11) -- StringFixedLength +SET @Enum = 'ENUM1_VALUE' +DECLARE @EnumN Char(11) -- StringFixedLength +SET @EnumN = 'ENUM2_VALUE' +DECLARE @Bool Char(1) -- StringFixedLength +SET @Bool = 't' +DECLARE @BoolN Char(1) -- StringFixedLength +SET @BoolN = 'f' + +INSERT INTO Issue3360Table1 +( + Id, + Byte, + ByteN, + Guid, + GuidN, + Enum, + EnumN, + Bool, + BoolN +) +VALUES +( + @Id, + @Byte, + @ByteN, + @Guid, + @GuidN, + @Enum, + @EnumN, + @Bool, + @BoolN +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 4 +DECLARE @Byte SmallInt(2) -- Int16 +SET @Byte = 3 +DECLARE @ByteN SmallInt(2) -- Int16 +SET @ByteN = 4 +DECLARE @Guid Char(36) -- StringFixedLength +SET @Guid = 'bd3973a5-4323-4dd8-9f4f-df9f93e2a627' +DECLARE @GuidN Char(36) -- StringFixedLength +SET @GuidN = 'bc7b663d-0fde-4327-8f92-5d8cc3a11d11' +DECLARE @Enum Char(11) -- StringFixedLength +SET @Enum = 'ENUM1_VALUE' +DECLARE @EnumN Char(11) -- StringFixedLength +SET @EnumN = 'ENUM2_VALUE' +DECLARE @Bool Char(1) -- StringFixedLength +SET @Bool = 'f' +DECLARE @BoolN Char(1) -- StringFixedLength +SET @BoolN = 't' + +INSERT INTO Issue3360Table1 +( + Id, + Byte, + ByteN, + Guid, + GuidN, + Enum, + EnumN, + Bool, + BoolN +) +VALUES +( + @Id, + @Byte, + @ByteN, + @Guid, + @GuidN, + @Enum, + @EnumN, + @Bool, + @BoolN +) + +BeforeExecute +-- Informix.DB2 Informix + +WITH cte +( + Id, + Byte, + ByteN, + Guid, + GuidN, + Enum, + EnumN, + Bool, + BoolN +) +AS +( + SELECT + r.Id, + r.Byte, + r.Byte, + r.Guid, + r.Guid, + NULL::NChar(11), + NULL::NChar(11), + r.Bool, + r.Bool + FROM + Issue3360Table1 r + WHERE + r.Id = 2 + UNION ALL + SELECT + r_1.Id, + r_1.Byte, + r_1.ByteN, + r_1.Guid, + r_1.GuidN, + r_1.Enum, + r_1.EnumN, + r_1.Bool, + r_1.BoolN + FROM + Issue3360Table1 r_1 + INNER JOIN cte parent ON r_1.Id = parent.Id + 2 +) +SELECT + t1.Id, + t1.Byte, + t1.ByteN, + t1.Guid, + t1.GuidN, + t1.Enum, + t1.EnumN, + t1.Bool, + t1.BoolN +FROM + cte t1 +ORDER BY + t1.Id + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS Issue3360Table1 + diff --git a/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3360_NullsInAnchor(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3360_NullsInAnchor(Informix.DB2.LinqService).sql new file mode 100644 index 00000000000..bc2a0b5b1f2 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3360_NullsInAnchor(Informix.DB2.LinqService).sql @@ -0,0 +1,227 @@ +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS Issue3360Table1 + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS Issue3360Table1 +( + Id Int NOT NULL, + Byte SmallInt NOT NULL, + ByteN SmallInt NULL, + Guid VARCHAR(36) NOT NULL, + GuidN VARCHAR(36) NULL, + Enum NChar(11) NOT NULL, + EnumN NChar(11) NULL, + Bool BOOLEAN NOT NULL, + BoolN BOOLEAN NULL, + + PRIMARY KEY (Id) +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Byte SmallInt(2) -- Int16 +SET @Byte = 0 +DECLARE @ByteN SmallInt -- Int16 +SET @ByteN = NULL +DECLARE @Guid Char(36) -- StringFixedLength +SET @Guid = '00000000-0000-0000-0000-000000000000' +DECLARE @GuidN Char -- StringFixedLength +SET @GuidN = NULL +DECLARE @Enum Char(11) -- StringFixedLength +SET @Enum = 'ENUM1_VALUE' +DECLARE @EnumN Char -- StringFixedLength +SET @EnumN = NULL +DECLARE @Bool Char(1) -- StringFixedLength +SET @Bool = 'f' +DECLARE @BoolN SmallInt -- Boolean +SET @BoolN = NULL + +INSERT INTO Issue3360Table1 +( + Id, + Byte, + ByteN, + Guid, + GuidN, + Enum, + EnumN, + Bool, + BoolN +) +VALUES +( + @Id, + @Byte, + @ByteN, + @Guid, + @GuidN, + @Enum, + @EnumN, + @Bool, + @BoolN +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 2 +DECLARE @Byte SmallInt(2) -- Int16 +SET @Byte = 1 +DECLARE @ByteN SmallInt(2) -- Int16 +SET @ByteN = 2 +DECLARE @Guid Char(36) -- StringFixedLength +SET @Guid = 'bc7b663d-0fde-4327-8f92-5d8cc3a11d11' +DECLARE @GuidN Char(36) -- StringFixedLength +SET @GuidN = 'a948600d-de21-4f74-8ac2-9516b287076e' +DECLARE @Enum Char(11) -- StringFixedLength +SET @Enum = 'ENUM1_VALUE' +DECLARE @EnumN Char(11) -- StringFixedLength +SET @EnumN = 'ENUM2_VALUE' +DECLARE @Bool Char(1) -- StringFixedLength +SET @Bool = 't' +DECLARE @BoolN Char(1) -- StringFixedLength +SET @BoolN = 'f' + +INSERT INTO Issue3360Table1 +( + Id, + Byte, + ByteN, + Guid, + GuidN, + Enum, + EnumN, + Bool, + BoolN +) +VALUES +( + @Id, + @Byte, + @ByteN, + @Guid, + @GuidN, + @Enum, + @EnumN, + @Bool, + @BoolN +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 4 +DECLARE @Byte SmallInt(2) -- Int16 +SET @Byte = 3 +DECLARE @ByteN SmallInt(2) -- Int16 +SET @ByteN = 4 +DECLARE @Guid Char(36) -- StringFixedLength +SET @Guid = 'bd3973a5-4323-4dd8-9f4f-df9f93e2a627' +DECLARE @GuidN Char(36) -- StringFixedLength +SET @GuidN = 'bc7b663d-0fde-4327-8f92-5d8cc3a11d11' +DECLARE @Enum Char(11) -- StringFixedLength +SET @Enum = 'ENUM1_VALUE' +DECLARE @EnumN Char(11) -- StringFixedLength +SET @EnumN = 'ENUM2_VALUE' +DECLARE @Bool Char(1) -- StringFixedLength +SET @Bool = 'f' +DECLARE @BoolN Char(1) -- StringFixedLength +SET @BoolN = 't' + +INSERT INTO Issue3360Table1 +( + Id, + Byte, + ByteN, + Guid, + GuidN, + Enum, + EnumN, + Bool, + BoolN +) +VALUES +( + @Id, + @Byte, + @ByteN, + @Guid, + @GuidN, + @Enum, + @EnumN, + @Bool, + @BoolN +) + +BeforeExecute +-- Informix.DB2 Informix + +WITH cte +( + Id, + Byte, + ByteN, + Guid, + GuidN, + Enum, + EnumN, + Bool, + BoolN +) +AS +( + SELECT + r.Id, + NULL::SmallInt, + NULL::SmallInt, + NULL::VARCHAR(36), + NULL::VARCHAR(36), + NULL::NChar(11), + NULL::NChar(11), + NULL::BOOLEAN, + NULL::BOOLEAN + FROM + Issue3360Table1 r + WHERE + r.Id = 1 + UNION ALL + SELECT + r_1.Id, + r_1.Byte, + r_1.ByteN, + r_1.Guid, + r_1.GuidN, + r_1.Enum, + r_1.EnumN, + r_1.Bool, + r_1.BoolN + FROM + Issue3360Table1 r_1 + INNER JOIN cte parent ON r_1.Id = parent.Id + 1 +) +SELECT + t1.Id, + t1.Byte, + t1.ByteN, + t1.Guid, + t1.GuidN, + t1.Enum, + t1.EnumN, + t1.Bool, + t1.BoolN +FROM + cte t1 +ORDER BY + t1.Id + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS Issue3360Table1 + diff --git a/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3407Test(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3407Test(Informix.DB2.LinqService).sql new file mode 100644 index 00000000000..ea6045bed17 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3407Test(Informix.DB2.LinqService).sql @@ -0,0 +1,56 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 +( + ID, + FirstName, + LastName, + MiddleName, + Gender, + Patient_PersonID, + Patient_Diagnosis +) +AS +( + SELECT + t1.PersonID, + t1.FirstName, + t1.LastName, + t1.MiddleName, + t1.Gender, + a_Patient.PersonID, + a_Patient.Diagnosis + FROM + Person t1 + LEFT JOIN Patient a_Patient ON t1.PersonID = a_Patient.PersonID +) +SELECT + r.FirstName, + r.ID, + r.LastName, + r.MiddleName, + r.Gender, + r.Patient_PersonID, + r.Patient_Diagnosis +FROM + CTE_1 r +WHERE + r.ID = 2 + +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 (ID) +AS +( + SELECT + t1.PersonID + FROM + Person t1 +) +SELECT + COUNT(*) +FROM + CTE_1 t2 + diff --git a/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue4167(Informix.DB2.LinqService,False).sql b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue4167(Informix.DB2.LinqService,False).sql new file mode 100644 index 00000000000..a725eddf4bb --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue4167(Informix.DB2.LinqService,False).sql @@ -0,0 +1,133 @@ +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS Issue4167Table + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS Issue4167Table +( + ID Int NOT NULL, + "Value" NVarChar(255) NULL, + EnumValue Int NULL, + + PRIMARY KEY (ID) +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @ID Integer(4) -- Int32 +SET @ID = 1 +DECLARE @Value VarChar(6) -- String +SET @Value = '000001' +DECLARE @EnumValue Integer(4) -- Int32 +SET @EnumValue = 0 + +INSERT INTO Issue4167Table +( + ID, + "Value", + EnumValue +) +VALUES +( + @ID, + @Value, + @EnumValue +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @ID Integer(4) -- Int32 +SET @ID = 2 +DECLARE @Value VarChar(6) -- String +SET @Value = '000001' +DECLARE @EnumValue Integer(4) -- Int32 +SET @EnumValue = 3 + +INSERT INTO Issue4167Table +( + ID, + "Value", + EnumValue +) +VALUES +( + @ID, + @Value, + @EnumValue +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @ID Integer(4) -- Int32 +SET @ID = 3 +DECLARE @Value VarChar(6) -- String +SET @Value = '000001' +DECLARE @EnumValue Integer -- Int32 +SET @EnumValue = NULL + +INSERT INTO Issue4167Table +( + ID, + "Value", + EnumValue +) +VALUES +( + @ID, + @Value, + @EnumValue +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @ID Integer(4) -- Int32 +SET @ID = 4 +DECLARE @Value VarChar(6) -- String +SET @Value = '000002' +DECLARE @EnumValue Integer(4) -- Int32 +SET @EnumValue = 0 + +INSERT INTO Issue4167Table +( + ID, + "Value", + EnumValue +) +VALUES +( + @ID, + @Value, + @EnumValue +) + +BeforeExecute +-- Informix.DB2 Informix + +SELECT + t1.EnumValue +FROM + ( + SELECT + CASE + WHEN g_1.EnumValue IS NOT NULL THEN g_1.EnumValue + ELSE 0 + END as EnumValue + FROM + Issue4167Table g_1 + WHERE + g_1."Value" = '000001' + GROUP BY + g_1."Value", + g_1.EnumValue + ) t1 +ORDER BY + t1.EnumValue + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS Issue4167Table + diff --git a/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue4167(Informix.DB2.LinqService,True).sql b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue4167(Informix.DB2.LinqService,True).sql new file mode 100644 index 00000000000..70b2c2d13df --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue4167(Informix.DB2.LinqService,True).sql @@ -0,0 +1,136 @@ +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS Issue4167Table + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS Issue4167Table +( + ID Int NOT NULL, + "Value" NVarChar(255) NULL, + EnumValue Int NULL, + + PRIMARY KEY (ID) +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @ID Integer(4) -- Int32 +SET @ID = 1 +DECLARE @Value VarChar(6) -- String +SET @Value = '000001' +DECLARE @EnumValue Integer(4) -- Int32 +SET @EnumValue = 0 + +INSERT INTO Issue4167Table +( + ID, + "Value", + EnumValue +) +VALUES +( + @ID, + @Value, + @EnumValue +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @ID Integer(4) -- Int32 +SET @ID = 2 +DECLARE @Value VarChar(6) -- String +SET @Value = '000001' +DECLARE @EnumValue Integer(4) -- Int32 +SET @EnumValue = 3 + +INSERT INTO Issue4167Table +( + ID, + "Value", + EnumValue +) +VALUES +( + @ID, + @Value, + @EnumValue +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @ID Integer(4) -- Int32 +SET @ID = 3 +DECLARE @Value VarChar(6) -- String +SET @Value = '000001' +DECLARE @EnumValue Integer -- Int32 +SET @EnumValue = NULL + +INSERT INTO Issue4167Table +( + ID, + "Value", + EnumValue +) +VALUES +( + @ID, + @Value, + @EnumValue +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @ID Integer(4) -- Int32 +SET @ID = 4 +DECLARE @Value VarChar(6) -- String +SET @Value = '000002' +DECLARE @EnumValue Integer(4) -- Int32 +SET @EnumValue = 0 + +INSERT INTO Issue4167Table +( + ID, + "Value", + EnumValue +) +VALUES +( + @ID, + @Value, + @EnumValue +) + +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 (EnumValue) +AS +( + SELECT + CASE + WHEN g_1.EnumValue IS NOT NULL THEN g_1.EnumValue + ELSE 0 + END + FROM + Issue4167Table g_1 + WHERE + g_1."Value" = '000001' + GROUP BY + g_1."Value", + g_1.EnumValue +) +SELECT + t1.EnumValue +FROM + CTE_1 t1 +ORDER BY + t1.EnumValue + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS Issue4167Table + diff --git a/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.RecursiveCount(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.RecursiveCount(Informix.DB2.LinqService).sql new file mode 100644 index 00000000000..22129f24ef7 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.RecursiveCount(Informix.DB2.LinqService).sql @@ -0,0 +1,386 @@ +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS HierarchyTree + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS HierarchyTree +( + Id Int NOT NULL, + ParentId Int NULL +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @ParentId Integer -- Int32 +SET @ParentId = NULL + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 2 +DECLARE @ParentId Integer -- Int32 +SET @ParentId = NULL + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 10 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 1 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 11 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 1 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 20 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 2 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 22 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 2 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 100 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 10 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 101 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 10 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 102 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 10 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 110 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 11 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 111 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 11 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 112 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 11 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 200 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 20 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 201 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 20 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 202 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 20 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 210 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 21 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 211 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 21 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 212 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 21 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 (Id) +AS +( + SELECT + t.Id + FROM + HierarchyTree t + WHERE + t.ParentId IS NULL +), +CTE_2 (ParentId, Id) +AS +( + SELECT + t1.ParentId, + t1.Id + FROM + HierarchyTree t1 +), +hierarchyDown (Level_1, Id) +AS +( + SELECT + 0, + t2.Id + FROM + CTE_1 t2 + UNION ALL + SELECT + t3.Level_1 + 1, + t_1.Id + FROM + hierarchyDown t3 + INNER JOIN CTE_2 t_1 ON t_1.ParentId = t3.Id +) +SELECT + COUNT(*) +FROM + hierarchyDown t4 + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS HierarchyTree + diff --git a/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.RecursiveDeepNesting(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.RecursiveDeepNesting(Informix.DB2.LinqService).sql new file mode 100644 index 00000000000..50dca40696e --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.RecursiveDeepNesting(Informix.DB2.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS HierarchyTree + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS HierarchyTree +( + Id Int NOT NULL, + ParentId Int NULL +) + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS HierarchyTree + diff --git a/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.RecursiveTest2(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.RecursiveTest2(Informix.DB2.LinqService).sql new file mode 100644 index 00000000000..be445d1f03c --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.RecursiveTest2(Informix.DB2.LinqService).sql @@ -0,0 +1,389 @@ +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS HierarchyTree + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS HierarchyTree +( + Id Int NOT NULL, + ParentId Int NULL +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @ParentId Integer -- Int32 +SET @ParentId = NULL + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 2 +DECLARE @ParentId Integer -- Int32 +SET @ParentId = NULL + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 10 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 1 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 11 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 1 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 20 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 2 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 22 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 2 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 100 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 10 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 101 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 10 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 102 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 10 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 110 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 11 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 111 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 11 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 112 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 11 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 200 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 20 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 201 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 20 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 202 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 20 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 210 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 21 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 211 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 21 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 212 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 21 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 (Id) +AS +( + SELECT + t.Id + FROM + HierarchyTree t + WHERE + t.ParentId IS NULL +), +CTE_2 (ParentId, Id) +AS +( + SELECT + t1.ParentId, + t1.Id + FROM + HierarchyTree t1 +), +hierarchyDown (Level_1, Id) +AS +( + SELECT + 0, + t2.Id + FROM + CTE_1 t2 + UNION ALL + SELECT + t3.Level_1 + 1, + t_1.Id + FROM + hierarchyDown t3 + INNER JOIN CTE_2 t_1 ON t_1.ParentId = t3.Id +) +SELECT + t4.Id, + t4.Level_1 +FROM + hierarchyDown t4 +ORDER BY + t4.Id + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS HierarchyTree + diff --git a/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.Test1(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.Test1(Informix.DB2.LinqService).sql new file mode 100644 index 00000000000..b6efd8c45e5 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.Test1(Informix.DB2.LinqService).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 (ParentID) +AS +( + SELECT + c_1.ParentID + FROM + Child c_1 + WHERE + c_1.ParentID > 1 +) +SELECT + p.ParentID, + p.Value1 +FROM + Parent p + INNER JOIN CTE_1 c_2 ON p.ParentID = c_2.ParentID + INNER JOIN CTE_1 c2 ON p.ParentID = c2.ParentID + +BeforeExecute +-- Informix.DB2 Informix + +SELECT + p.ParentID, + p.Value1 +FROM + Parent p + INNER JOIN Child c_1 ON p.ParentID = c_1.ParentID + INNER JOIN Child c2 ON p.ParentID = c2.ParentID +WHERE + c_1.ParentID > 1 AND c2.ParentID > 1 + diff --git a/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.Test4(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.Test4(Informix.DB2.LinqService).sql new file mode 100644 index 00000000000..b91b7a0e41e --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.Test4(Informix.DB2.LinqService).sql @@ -0,0 +1,43 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE1_ (ParentID) +AS +( + SELECT + c_1.ParentID + FROM + Child c_1 + WHERE + c_1.ParentID > 1 +), +LAST0 (ParentID, ChildID) +AS +( + SELECT + c4.ParentID, + c4.ChildID + FROM + Child c4 + WHERE + Mod(c4.ParentID, 2) = 0 +) +SELECT + c4_1.ParentID, + c4_1.ChildID +FROM + CTE1_ p + INNER JOIN LAST0 c4_1 ON c4_1.ParentID = p.ParentID + +BeforeExecute +-- Informix.DB2 Informix + +SELECT + c4.ParentID, + c4.ChildID +FROM + Child p + INNER JOIN Child c4 ON c4.ParentID = p.ParentID +WHERE + p.ParentID > 1 AND Mod(c4.ParentID, 2) = 0 + diff --git a/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.Test5(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.Test5(Informix.DB2.LinqService).sql new file mode 100644 index 00000000000..be500b4724b --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.Test5(Informix.DB2.LinqService).sql @@ -0,0 +1,52 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 (ParentID) +AS +( + SELECT + t1.ParentID + FROM + ( + SELECT DISTINCT + c_1.ParentID, + c_1.ChildID + FROM + Child c_1 + WHERE + c_1.ParentID > 1 + ) t1 +) +SELECT + COUNT(*) +FROM + Parent p + INNER JOIN CTE_1 c_2 ON p.ParentID = c_2.ParentID + INNER JOIN CTE_1 c2 ON p.ParentID = c2.ParentID + +BeforeExecute +-- Informix.DB2 Informix + +SELECT + COUNT(*) +FROM + Parent p + INNER JOIN ( + SELECT DISTINCT + c_1.ParentID, + c_1.ChildID + FROM + Child c_1 + WHERE + c_1.ParentID > 1 + ) c_2 ON p.ParentID = c_2.ParentID + INNER JOIN ( + SELECT DISTINCT + c2.ParentID, + c2.ChildID + FROM + Child c2 + WHERE + c2.ParentID > 1 + ) c2_1 ON p.ParentID = c2_1.ParentID + diff --git a/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.TestAsTable(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.TestAsTable(Informix.DB2.LinqService).sql new file mode 100644 index 00000000000..5b59519dd4f --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.TestAsTable(Informix.DB2.LinqService).sql @@ -0,0 +1,27 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE1_ (ParentID, ChildID) +AS +( + SELECT + t1.ParentID, + t1.ChildID + FROM + Child t1 +) +SELECT + t2.ParentID, + t2.ChildID +FROM + CTE1_ t2 + +BeforeExecute +-- Informix.DB2 Informix + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 + diff --git a/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.TestCustomCount(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.TestCustomCount(Informix.DB2.LinqService).sql new file mode 100644 index 00000000000..3a6af0bec3a --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.TestCustomCount(Informix.DB2.LinqService).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 (ParentID, ChildID) +AS +( + SELECT DISTINCT + c_1.ParentID, + c_1.ChildID + FROM + Child c_1 + WHERE + c_1.ParentID > 1 +) +SELECT + COUNT(*) +FROM + CTE_1 t1 + diff --git a/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.TestDoubleRecursion(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.TestDoubleRecursion(Informix.DB2.LinqService).sql new file mode 100644 index 00000000000..01e7deaea12 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.TestDoubleRecursion(Informix.DB2.LinqService).sql @@ -0,0 +1,387 @@ +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS HierarchyTree + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS HierarchyTree +( + Id Int NOT NULL, + ParentId Int NULL +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @ParentId Integer -- Int32 +SET @ParentId = NULL + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 2 +DECLARE @ParentId Integer -- Int32 +SET @ParentId = NULL + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 10 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 1 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 11 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 1 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 20 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 2 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 22 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 2 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 100 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 10 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 101 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 10 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 102 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 10 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 110 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 11 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 111 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 11 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 112 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 11 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 200 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 20 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 201 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 20 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 202 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 20 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 210 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 21 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 211 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 21 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 212 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 21 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 (Id) +AS +( + SELECT + t.Id + FROM + HierarchyTree t + WHERE + t.ParentId IS NULL +), +CTE_2 (ParentId, Id) +AS +( + SELECT + t1.ParentId, + t1.Id + FROM + HierarchyTree t1 +), +hierarchyDown (Level_1, Id) +AS +( + SELECT + 0, + t2.Id + FROM + CTE_1 t2 + UNION ALL + SELECT + t3.Level_1 + 1, + t_1.Id + FROM + hierarchyDown t3 + INNER JOIN CTE_2 t_1 ON t_1.ParentId = t3.Id +) +SELECT + COUNT(*) +FROM + hierarchyDown t4 + INNER JOIN hierarchyDown h2 ON h2.Id = t4.Id + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS HierarchyTree + diff --git a/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.TestNesting(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.TestNesting(Informix.DB2.LinqService).sql new file mode 100644 index 00000000000..bab09ccf6ae --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.TestNesting(Informix.DB2.LinqService).sql @@ -0,0 +1,77 @@ +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS NestingA + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS NestingA +( + Property1 NVarChar(255) NULL +) + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS NestingB + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS NestingB +( + Property1 NVarChar(255) NULL, + Property2 NVarChar(255) NULL +) + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS NestingC + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS NestingC +( + Property1 NVarChar(255) NULL, + Property2 NVarChar(255) NULL, + Property3 NVarChar(255) NULL +) + +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 (Property1) +AS +( + SELECT + a.Property2 + FROM + NestingC a +) +SELECT + c2.Property1, + t_1.Property2, + t_1.Property3 +FROM + CTE_1 c2 + CROSS JOIN NestingC t + CROSS JOIN NestingC t_1 + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS NestingC + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS NestingB + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS NestingA + diff --git a/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.TestNoColumns(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.TestNoColumns(Informix.DB2.LinqService).sql new file mode 100644 index 00000000000..fa9f5c34ce8 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.TestNoColumns(Informix.DB2.LinqService).sql @@ -0,0 +1,63 @@ +BeforeExecute +-- Informix.DB2 Informix + +SELECT + COUNT(*) +FROM + Child t1 + +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE1_ (ParentID, ChildID) +AS +( + SELECT + t1.ParentID, + t1.ChildID + FROM + Child t1 +) +SELECT + COUNT(*) +FROM + CTE1_ t2 + +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE1_ (C_ChildID) +AS +( + SELECT + c_1.ChildID + FROM + Child c_1 +) +SELECT + COUNT(*) +FROM + CTE1_ t1 + +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE1_ AS +( + SELECT + * + FROM + Child c_1 +) +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + CTE1_ t1 + ) THEN 't' + ELSE 'f' + END::BOOLEAN +FROM table(set{1}) + diff --git a/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.TestWithWrapper(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.TestWithWrapper(Informix.DB2.LinqService).sql new file mode 100644 index 00000000000..013da9f55e4 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.TestWithWrapper(Informix.DB2.LinqService).sql @@ -0,0 +1,33 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 (Child_ParentID, Child_ChildID) +AS +( + SELECT + child_1.ParentID, + child_1.ChildID + FROM + Child child_1 +) +SELECT + p.ParentID, + p.Value1, + c_1.Child_ParentID, + c_1.Child_ChildID +FROM + Parent p + INNER JOIN CTE_1 c_1 ON p.ParentID = c_1.Child_ParentID + +BeforeExecute +-- Informix.DB2 Informix + +SELECT + p.ParentID, + p.Value1, + c_1.ParentID, + c_1.ChildID +FROM + Parent p + INNER JOIN Child c_1 ON p.ParentID = c_1.ParentID + diff --git a/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.TestWithWrapperUnion(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.TestWithWrapperUnion(Informix.DB2.LinqService).sql new file mode 100644 index 00000000000..d06f252ac1a --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.TestWithWrapperUnion(Informix.DB2.LinqService).sql @@ -0,0 +1,80 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 +( + Child_ParentID, + Child_ChildID, + Parent_ParentID, + Parent_Value1 +) +AS +( + SELECT + child_1.ParentID, + child_1.ChildID, + a_Parent.ParentID, + a_Parent.Value1 + FROM + Child child_1 + LEFT JOIN Parent a_Parent ON child_1.ParentID = a_Parent.ParentID +) +SELECT + a_Parent_1.ParentID, + a_Parent_1.ParentID, + a_Parent_1.Value1, + child_2.ParentID, + child_2.ChildID +FROM + Child child_2 + LEFT JOIN Parent a_Parent_1 ON child_2.ParentID = a_Parent_1.ParentID +UNION +SELECT + t1.Parent_ParentID, + t1.Parent_ParentID, + t1.Parent_Value1, + t1.Child_ParentID, + t1.Child_ChildID +FROM + CTE_1 t1 + +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 +( + Child_ParentID, + Child_ChildID, + Parent_ParentID, + Parent_Value1 +) +AS +( + SELECT + child_1.ParentID, + child_1.ChildID, + a_Parent.ParentID, + a_Parent.Value1 + FROM + Child child_1 + LEFT JOIN Parent a_Parent ON child_1.ParentID = a_Parent.ParentID +) +SELECT + t1.Child_ParentID, + t1.Child_ChildID, + t1.Parent_ParentID, + t1.Parent_ParentID, + t1.Parent_Value1 +FROM + CTE_1 t1 +UNION +SELECT + child_2.ParentID, + child_2.ChildID, + a_Parent_1.ParentID, + a_Parent_1.ParentID, + a_Parent_1.Value1 +FROM + Child child_2 + LEFT JOIN Parent a_Parent_1 ON child_2.ParentID = a_Parent_1.ParentID + diff --git a/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.WithLimitedOrderBy(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.WithLimitedOrderBy(Informix.DB2.LinqService).sql new file mode 100644 index 00000000000..47106b629a0 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/CteTests/Tests.Linq.CteTests.WithLimitedOrderBy(Informix.DB2.LinqService).sql @@ -0,0 +1,22 @@ +BeforeExecute +-- Informix.DB2 Informix +DECLARE @take Integer(4) -- Int32 +SET @take = 3 + +WITH CTE_1 (ParentID, Value1) +AS +( + SELECT FIRST @take + t1.ParentID, + t1.Value1 + FROM + Parent t1 + ORDER BY + t1.ParentID DESC +) +SELECT + t2.ParentID, + t2.Value1 +FROM + CTE_1 t2 + diff --git a/Informix.DB2.LinqService/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Issue4098WithCte(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Issue4098WithCte(Informix.DB2.LinqService).sql new file mode 100644 index 00000000000..ebb22a4022c --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Issue4098WithCte(Informix.DB2.LinqService).sql @@ -0,0 +1,376 @@ +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS "Transaction" + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS "Transaction" +( + InvestorId NVarChar(255) NULL, + SecurityClass NVarChar(255) NOT NULL, + Units Int NOT NULL +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @InvestorId VarChar(4) -- String +SET @InvestorId = 'inv1' +DECLARE @SecurityClass VarChar(4) -- String +SET @SecurityClass = 'test' +DECLARE @Units Integer(4) -- Int32 +SET @Units = 100 + +INSERT INTO "Transaction" +( + InvestorId, + SecurityClass, + Units +) +VALUES +( + @InvestorId, + @SecurityClass, + @Units +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @InvestorId VarChar(4) -- String +SET @InvestorId = 'inv1' +DECLARE @SecurityClass VarChar(4) -- String +SET @SecurityClass = 'test' +DECLARE @Units Integer(4) -- Int32 +SET @Units = 200 + +INSERT INTO "Transaction" +( + InvestorId, + SecurityClass, + Units +) +VALUES +( + @InvestorId, + @SecurityClass, + @Units +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @InvestorId VarChar(4) -- String +SET @InvestorId = 'inv2' +DECLARE @SecurityClass VarChar(4) -- String +SET @SecurityClass = 'test' +DECLARE @Units Integer(4) -- Int32 +SET @Units = 300 + +INSERT INTO "Transaction" +( + InvestorId, + SecurityClass, + Units +) +VALUES +( + @InvestorId, + @SecurityClass, + @Units +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @InvestorId VarChar(4) -- String +SET @InvestorId = 'inv2' +DECLARE @SecurityClass VarChar(4) -- String +SET @SecurityClass = 'test' +DECLARE @Units Integer(4) -- Int32 +SET @Units = 400 + +INSERT INTO "Transaction" +( + InvestorId, + SecurityClass, + Units +) +VALUES +( + @InvestorId, + @SecurityClass, + @Units +) + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS InvestorPayment + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS InvestorPayment +( + Id Int NOT NULL, + InvestorId NVarChar(255) NOT NULL, + NetPayment Int NOT NULL +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @InvestorId VarChar(4) -- String +SET @InvestorId = 'inv1' +DECLARE @NetPayment Integer(4) -- Int32 +SET @NetPayment = 100 + +INSERT INTO InvestorPayment +( + Id, + InvestorId, + NetPayment +) +VALUES +( + @Id, + @InvestorId, + @NetPayment +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 2 +DECLARE @InvestorId VarChar(4) -- String +SET @InvestorId = 'inv2' +DECLARE @NetPayment Integer(4) -- Int32 +SET @NetPayment = 200 + +INSERT INTO InvestorPayment +( + Id, + InvestorId, + NetPayment +) +VALUES +( + @Id, + @InvestorId, + @NetPayment +) + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS PaymentEvent + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS PaymentEvent +( + Id Int NOT NULL, + Description NVarChar(255) NULL, + SecurityClass NVarChar(255) NOT NULL +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Description VarChar(3) -- String +SET @Description = 'one' +DECLARE @SecurityClass VarChar(4) -- String +SET @SecurityClass = 'test' + +INSERT INTO PaymentEvent +( + Id, + Description, + SecurityClass +) +VALUES +( + @Id, + @Description, + @SecurityClass +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 2 +DECLARE @Description VarChar(3) -- String +SET @Description = 'two' +DECLARE @SecurityClass VarChar(4) -- String +SET @SecurityClass = 'test' + +INSERT INTO PaymentEvent +( + Id, + Description, + SecurityClass +) +VALUES +( + @Id, + @Description, + @SecurityClass +) + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS InvestorPaymentDetail + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS InvestorPaymentDetail +( + InvestorId NVarChar(255) NULL, + CalculationId Int NOT NULL +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @InvestorId VarChar(4) -- String +SET @InvestorId = 'inv1' +DECLARE @CalculationId Integer(4) -- Int32 +SET @CalculationId = 1 + +INSERT INTO InvestorPaymentDetail +( + InvestorId, + CalculationId +) +VALUES +( + @InvestorId, + @CalculationId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @InvestorId VarChar(4) -- String +SET @InvestorId = 'inv2' +DECLARE @CalculationId Integer(4) -- Int32 +SET @CalculationId = 2 + +INSERT INTO InvestorPaymentDetail +( + InvestorId, + CalculationId +) +VALUES +( + @InvestorId, + @CalculationId +) + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS PaymentCalculation + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS PaymentCalculation +( + Id Int NOT NULL, + EventId Int NOT NULL +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @EventId Integer(4) -- Int32 +SET @EventId = 1 + +INSERT INTO PaymentCalculation +( + Id, + EventId +) +VALUES +( + @Id, + @EventId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 2 +DECLARE @EventId Integer(4) -- Int32 +SET @EventId = 2 + +INSERT INTO PaymentCalculation +( + Id, + EventId +) +VALUES +( + @Id, + @EventId +) + +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 (InvestorId, SecurityClass, Units) +AS +( + SELECT + g_1.InvestorId, + g_1.SecurityClass, + SUM(g_1.Units) + FROM + "Transaction" g_1 + GROUP BY + g_1.SecurityClass, + g_1.InvestorId +) +SELECT + ip.InvestorId, + b.Units, + SUM(ip.NetPayment) +FROM + PaymentEvent g_2 + INNER JOIN InvestorPayment ip ON g_2.Id = ip.Id + INNER JOIN InvestorPaymentDetail ipd ON ip.InvestorId = ipd.InvestorId + INNER JOIN PaymentCalculation pc ON ipd.CalculationId = pc.Id AND g_2.Id = pc.EventId + INNER JOIN CTE_1 b ON ip.InvestorId = b.InvestorId AND g_2.SecurityClass = b.SecurityClass +GROUP BY + ip.InvestorId, + b.Units + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS PaymentCalculation + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS InvestorPaymentDetail + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS PaymentEvent + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS InvestorPayment + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS "Transaction" + diff --git a/Informix.DB2.LinqService/Tests/Linq/IdentifierTests/Tests.Linq.IdentifierTests.TestAliasLengthName_Latin(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/Linq/IdentifierTests/Tests.Linq.IdentifierTests.TestAliasLengthName_Latin(Informix.DB2.LinqService).sql new file mode 100644 index 00000000000..466c2b8a7bc --- /dev/null +++ b/Informix.DB2.LinqService/Tests/Linq/IdentifierTests/Tests.Linq.IdentifierTests.TestAliasLengthName_Latin(Informix.DB2.LinqService).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Informix.DB2 Informix + +SELECT + abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd.FirstName, + abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd.PersonID, + abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd.LastName, + abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd.MiddleName, + abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd.Gender +FROM + Person abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd +WHERE + abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd.PersonID = 1 + diff --git a/Informix.DB2.LinqService/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteExpressionIsNotATable(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteExpressionIsNotATable(Informix.DB2.LinqService).sql new file mode 100644 index 00000000000..f96fb4a829b --- /dev/null +++ b/Informix.DB2.LinqService/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteExpressionIsNotATable(Informix.DB2.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 +( + entry_ID, + entry_FirstName, + entry_LastName, + entry_MiddleName, + entry_Gender +) +AS +( + SELECT + person_1.PersonID, + person_1.FirstName, + person_1.LastName, + person_1.MiddleName, + person_1.Gender + FROM + Person person_1 +) +SELECT + x.entry_FirstName, + x.entry_ID, + x.entry_LastName, + x.entry_MiddleName, + x.entry_Gender +FROM + CTE_1 x +WHERE + x.entry_ID = 1 + +BeforeExecute +-- Informix.DB2 Informix + +SELECT + x.FirstName, + x.PersonID, + x.LastName, + x.MiddleName, + x.Gender +FROM + Person x +WHERE + x.PersonID = 1 + diff --git a/Informix.DB2.LinqService/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteInvalidMapping(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteInvalidMapping(Informix.DB2.LinqService).sql new file mode 100644 index 00000000000..701abb4d3aa --- /dev/null +++ b/Informix.DB2.LinqService/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteInvalidMapping(Informix.DB2.LinqService).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 +( + entry_FirstName, + entry_ID, + entry_LastName, + entry_MiddleName, + entry_Gender, + rn +) +AS +( + SELECT + x.FirstName, + x.PersonID, + x.LastName, + x.MiddleName, + x.Gender, + 1 + FROM + Person x +) +SELECT FIRST 1 + t1.entry_FirstName, + t1.entry_ID, + t1.entry_LastName, + t1.entry_MiddleName, + t1.entry_Gender, + t1.rn +FROM + CTE_1 t1 + +BeforeExecute +-- Informix.DB2 Informix + +SELECT FIRST 1 + person_1.FirstName, + person_1.PersonID, + person_1.LastName, + person_1.MiddleName, + person_1.Gender, + 1 +FROM + Person person_1 + diff --git a/Informix.DB2.LinqService/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteInvalidMappingUnion(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteInvalidMappingUnion(Informix.DB2.LinqService).sql new file mode 100644 index 00000000000..fba7db8adcd --- /dev/null +++ b/Informix.DB2.LinqService/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteInvalidMappingUnion(Informix.DB2.LinqService).sql @@ -0,0 +1,91 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 +( + entry_FirstName, + entry_ID, + entry_LastName, + entry_MiddleName, + entry_Gender, + rn +) +AS +( + SELECT + x_1.FirstName, + x_1.ID, + x_1.LastName, + x_1.MiddleName, + x_1.Gender, + x_1.rn + FROM + ( + SELECT + 1 as rn, + x.FirstName, + x.PersonID as ID, + x.LastName, + x.MiddleName, + x.Gender + FROM + Person x + UNION ALL + SELECT + 2 as rn, + person_1.FirstName, + person_1.PersonID as ID, + person_1.LastName, + person_1.MiddleName, + person_1.Gender + FROM + Person person_1 + ) x_1 + WHERE + x_1.rn = 1 +) +SELECT FIRST 1 + t1.entry_FirstName, + t1.entry_ID, + t1.entry_LastName, + t1.entry_MiddleName, + t1.entry_Gender, + t1.rn +FROM + CTE_1 t1 + +BeforeExecute +-- Informix.DB2 Informix + +SELECT FIRST 1 + t1.FirstName, + t1.ID, + t1.LastName, + t1.MiddleName, + t1.Gender, + t1.rn +FROM + ( + SELECT + 1 as rn, + x.FirstName, + x.PersonID as ID, + x.LastName, + x.MiddleName, + x.Gender + FROM + Person x + UNION ALL + SELECT + 2 as rn, + person_1.FirstName, + person_1.PersonID as ID, + person_1.LastName, + person_1.MiddleName, + person_1.Gender + FROM + Person person_1 + ) t1 +WHERE + t1.rn = 1 + diff --git a/Informix.DB2.LinqService/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteNoFieldList(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteNoFieldList(Informix.DB2.LinqService).sql new file mode 100644 index 00000000000..9f50e5134e8 --- /dev/null +++ b/Informix.DB2.LinqService/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteNoFieldList(Informix.DB2.LinqService).sql @@ -0,0 +1,43 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH cte +( + FirstName, + ID, + LastName, + MiddleName, + Gender +) +AS +( + SELECT + x.FirstName, + x.PersonID, + x.LastName, + x.MiddleName, + x.Gender + FROM + Person x +) +SELECT + t1.FirstName, + t1.ID, + t1.LastName, + t1.MiddleName, + t1.Gender +FROM + cte t1 + +BeforeExecute +-- Informix.DB2 Informix + +SELECT + x.FirstName, + x.PersonID, + x.LastName, + x.MiddleName, + x.Gender +FROM + Person x + diff --git a/Informix.DB2.LinqService/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteReservedWords(Informix.DB2.LinqService).sql b/Informix.DB2.LinqService/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteReservedWords(Informix.DB2.LinqService).sql new file mode 100644 index 00000000000..51471d1cfdf --- /dev/null +++ b/Informix.DB2.LinqService/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteReservedWords(Informix.DB2.LinqService).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 (Obj_Operator) +AS +( + SELECT + x.LastName + FROM + Person x +) +SELECT FIRST 1 + t1.Obj_Operator +FROM + CTE_1 t1 + +BeforeExecute +-- Informix.DB2 Informix + +SELECT FIRST 1 + person_1.LastName +FROM + Person person_1 + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue2029Test(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue2029Test(Informix.DB2).sql new file mode 100644 index 00000000000..a272c59b429 --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue2029Test(Informix.DB2).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS NC_CODE + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS NC_CODE +( + HANDLE NVarChar(255) NOT NULL, + CHANGE_STAMP Decimal NULL, + SITE NVarChar(18) NULL, + NC_CODE NVarChar(48) NULL, + DESCRIPTION NVarChar(120) NULL, + STATUS_BO NVarChar(255) NULL, + CREATED_DATE_TIME datetime year to fraction NULL, + MODIFIED_DATE_TIME datetime year to fraction NULL, + NC_CATEGORY NVarChar(255) NULL, + DPMO_CATEGORY_BO NVarChar(255) NULL +) + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS NC_GROUP_MEMBER + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS NC_GROUP_MEMBER +( + HANDLE NVarChar(255) NOT NULL, + NC_GROUP_BO NVarChar(255) NULL, + NC_CODE_OR_GROUP_GBO NVarChar(255) NULL, + "SEQUENCE" Decimal NULL +) + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS NC_GROUP_MEMBER + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS NC_CODE + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue2145Test2(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue2145Test2(Informix.DB2).sql new file mode 100644 index 00000000000..fc321a693f3 --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue2145Test2(Informix.DB2).sql @@ -0,0 +1,36 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 +( + ID, + FirstName, + LastName, + MiddleName, + Gender +) +AS +( + SELECT + t1.ID, + t1.FirstName, + t1.LastName, + t1.MiddleName, + t1.Gender + FROM + ( + SELECT 10::Int AS ID, 'FN1'::NVarChar(255) AS FirstName, 'LN1'::NVarChar(255) AS LastName, NULL::NVarChar(255) AS MiddleName, 'M'::Char(1) AS Gender FROM table(set{1}) + UNION ALL + SELECT 11::Int, 'FN2'::NVarChar(255), NULL::NVarChar(255), NULL::NVarChar(255), 'F'::Char(1) FROM table(set{1})) t1 +) +SELECT + p.FirstName, + p.ID, + p.LastName, + p.MiddleName, + p.Gender +FROM + CTE_1 p +WHERE + p.ID = 11 + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue2264(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue2264(Informix.DB2).sql new file mode 100644 index 00000000000..33d67f86300 --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue2264(Informix.DB2).sql @@ -0,0 +1,71 @@ +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS TestFolder + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS TestFolder +( + Id VARCHAR(36) NOT NULL, + Label NVarChar(255) NULL, + ParentId VARCHAR(36) NULL +) + +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE +( + Level_1, + Id, + ParentId, + Label, + Entity_Id, + Entity_Label, + Entity_ParentId +) +AS +( + SELECT + 0, + c_1.Id, + c_1.ParentId, + c_1.Label, + c_1.Id, + c_1.Label, + c_1.ParentId + FROM + TestFolder c_1 + WHERE + c_1.ParentId IS NULL + UNION ALL + SELECT + r.Level_1 + 1, + t1.Id, + t1.ParentId, + r.Label || '/' || t1.Label, + t1.Id, + t1.Label, + t1.ParentId + FROM + TestFolder t1 + INNER JOIN CTE r ON t1.ParentId = r.Id +) +SELECT + t2.Level_1, + t2.Id, + t2.ParentId, + t2.Label, + t2.Entity_Id, + t2.Entity_Label, + t2.Entity_ParentId +FROM + CTE t2 + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS TestFolder + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue2451_ComplexColumn_All(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue2451_ComplexColumn_All(Informix.DB2).sql new file mode 100644 index 00000000000..793ade01cc0 --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue2451_ComplexColumn_All(Informix.DB2).sql @@ -0,0 +1,22 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH cte (FirstName) +AS +( + SELECT + p.FirstName + FROM + Person p + UNION ALL + SELECT + r.FirstName || '/' || r.LastName + FROM + cte t1 + INNER JOIN Person r ON t1.FirstName = r.LastName +) +SELECT + t2.FirstName +FROM + cte t2 + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3357_RecordClass(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3357_RecordClass(Informix.DB2).sql new file mode 100644 index 00000000000..65e57e623e3 --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3357_RecordClass(Informix.DB2).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH cte (Id, FirstName, LastName) +AS +( + SELECT + p.PersonID, + p.FirstName, + p.LastName + FROM + Person p + UNION ALL + SELECT + r.PersonID, + r.FirstName, + r.LastName + FROM + cte t1 + INNER JOIN Person r ON t1.FirstName = r.LastName +) +SELECT + t2.Id, + t2.FirstName, + t2.LastName +FROM + cte t2 + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3357_RecordLikeClass(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3357_RecordLikeClass(Informix.DB2).sql new file mode 100644 index 00000000000..65e57e623e3 --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3357_RecordLikeClass(Informix.DB2).sql @@ -0,0 +1,28 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH cte (Id, FirstName, LastName) +AS +( + SELECT + p.PersonID, + p.FirstName, + p.LastName + FROM + Person p + UNION ALL + SELECT + r.PersonID, + r.FirstName, + r.LastName + FROM + cte t1 + INNER JOIN Person r ON t1.FirstName = r.LastName +) +SELECT + t2.Id, + t2.FirstName, + t2.LastName +FROM + cte t2 + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3360_DoubleColumnSelection(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3360_DoubleColumnSelection(Informix.DB2).sql new file mode 100644 index 00000000000..6ce0bdbf293 --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3360_DoubleColumnSelection(Informix.DB2).sql @@ -0,0 +1,227 @@ +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS Issue3360Table1 + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS Issue3360Table1 +( + Id Int NOT NULL, + Byte SmallInt NOT NULL, + ByteN SmallInt NULL, + Guid VARCHAR(36) NOT NULL, + GuidN VARCHAR(36) NULL, + Enum NChar(11) NOT NULL, + EnumN NChar(11) NULL, + Bool BOOLEAN NOT NULL, + BoolN BOOLEAN NULL, + + PRIMARY KEY (Id) +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Byte SmallInt(2) -- Int16 +SET @Byte = 0 +DECLARE @ByteN SmallInt -- Int16 +SET @ByteN = NULL +DECLARE @Guid Char(36) -- StringFixedLength +SET @Guid = '00000000-0000-0000-0000-000000000000' +DECLARE @GuidN Char -- StringFixedLength +SET @GuidN = NULL +DECLARE @Enum Char(11) -- StringFixedLength +SET @Enum = 'ENUM1_VALUE' +DECLARE @EnumN Char -- StringFixedLength +SET @EnumN = NULL +DECLARE @Bool Char(1) -- StringFixedLength +SET @Bool = 'f' +DECLARE @BoolN SmallInt -- Boolean +SET @BoolN = NULL + +INSERT INTO Issue3360Table1 +( + Id, + Byte, + ByteN, + Guid, + GuidN, + Enum, + EnumN, + Bool, + BoolN +) +VALUES +( + @Id, + @Byte, + @ByteN, + @Guid, + @GuidN, + @Enum, + @EnumN, + @Bool, + @BoolN +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 2 +DECLARE @Byte SmallInt(2) -- Int16 +SET @Byte = 1 +DECLARE @ByteN SmallInt(2) -- Int16 +SET @ByteN = 2 +DECLARE @Guid Char(36) -- StringFixedLength +SET @Guid = 'bc7b663d-0fde-4327-8f92-5d8cc3a11d11' +DECLARE @GuidN Char(36) -- StringFixedLength +SET @GuidN = 'a948600d-de21-4f74-8ac2-9516b287076e' +DECLARE @Enum Char(11) -- StringFixedLength +SET @Enum = 'ENUM1_VALUE' +DECLARE @EnumN Char(11) -- StringFixedLength +SET @EnumN = 'ENUM2_VALUE' +DECLARE @Bool Char(1) -- StringFixedLength +SET @Bool = 't' +DECLARE @BoolN Char(1) -- StringFixedLength +SET @BoolN = 'f' + +INSERT INTO Issue3360Table1 +( + Id, + Byte, + ByteN, + Guid, + GuidN, + Enum, + EnumN, + Bool, + BoolN +) +VALUES +( + @Id, + @Byte, + @ByteN, + @Guid, + @GuidN, + @Enum, + @EnumN, + @Bool, + @BoolN +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 4 +DECLARE @Byte SmallInt(2) -- Int16 +SET @Byte = 3 +DECLARE @ByteN SmallInt(2) -- Int16 +SET @ByteN = 4 +DECLARE @Guid Char(36) -- StringFixedLength +SET @Guid = 'bd3973a5-4323-4dd8-9f4f-df9f93e2a627' +DECLARE @GuidN Char(36) -- StringFixedLength +SET @GuidN = 'bc7b663d-0fde-4327-8f92-5d8cc3a11d11' +DECLARE @Enum Char(11) -- StringFixedLength +SET @Enum = 'ENUM1_VALUE' +DECLARE @EnumN Char(11) -- StringFixedLength +SET @EnumN = 'ENUM2_VALUE' +DECLARE @Bool Char(1) -- StringFixedLength +SET @Bool = 'f' +DECLARE @BoolN Char(1) -- StringFixedLength +SET @BoolN = 't' + +INSERT INTO Issue3360Table1 +( + Id, + Byte, + ByteN, + Guid, + GuidN, + Enum, + EnumN, + Bool, + BoolN +) +VALUES +( + @Id, + @Byte, + @ByteN, + @Guid, + @GuidN, + @Enum, + @EnumN, + @Bool, + @BoolN +) + +BeforeExecute +-- Informix.DB2 Informix + +WITH cte +( + Id, + Byte, + ByteN, + Guid, + GuidN, + Enum, + EnumN, + Bool, + BoolN +) +AS +( + SELECT + r.Id, + r.Byte, + r.Byte, + r.Guid, + r.Guid, + NULL::NChar(11), + NULL::NChar(11), + r.Bool, + r.Bool + FROM + Issue3360Table1 r + WHERE + r.Id = 2 + UNION ALL + SELECT + r_1.Id, + r_1.Byte, + r_1.ByteN, + r_1.Guid, + r_1.GuidN, + r_1.Enum, + r_1.EnumN, + r_1.Bool, + r_1.BoolN + FROM + Issue3360Table1 r_1 + INNER JOIN cte parent ON r_1.Id = parent.Id + 2 +) +SELECT + t1.Id, + t1.Byte, + t1.ByteN, + t1.Guid, + t1.GuidN, + t1.Enum, + t1.EnumN, + t1.Bool, + t1.BoolN +FROM + cte t1 +ORDER BY + t1.Id + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS Issue3360Table1 + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3360_NullEnumInAnchor(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3360_NullEnumInAnchor(Informix.DB2).sql new file mode 100644 index 00000000000..9f5a032e03f --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3360_NullEnumInAnchor(Informix.DB2).sql @@ -0,0 +1,45 @@ +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS Issue3360NullInAnchor + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS Issue3360NullInAnchor +( + Id Int NOT NULL, + Guid VARCHAR(36) NULL, + Enum1 VarChar(50) NULL +) + +BeforeExecute +-- Informix.DB2 Informix + +WITH cte (Id, Enum1) +AS +( + SELECT + p.Id, + NULL::VarChar(50) + FROM + Issue3360NullInAnchor p + UNION ALL + SELECT + t1.Id, + 'THIS_IS_ONE' + FROM + cte t1 + INNER JOIN Issue3360NullInAnchor r ON t1.Id = r.Id + 100 +) +SELECT + t2.Id, + t2.Enum1 +FROM + cte t2 + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS Issue3360NullInAnchor + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3360_NullGuidInAnchor(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3360_NullGuidInAnchor(Informix.DB2).sql new file mode 100644 index 00000000000..66c1a3cbc08 --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3360_NullGuidInAnchor(Informix.DB2).sql @@ -0,0 +1,45 @@ +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS Issue3360NullInAnchor + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS Issue3360NullInAnchor +( + Id Int NOT NULL, + Guid VARCHAR(36) NULL, + Enum1 VarChar(50) NULL +) + +BeforeExecute +-- Informix.DB2 Informix + +WITH cte (Id, Guid) +AS +( + SELECT + p.Id, + NULL::VARCHAR(36) + FROM + Issue3360NullInAnchor p + UNION ALL + SELECT + t1.Id, + r.Guid + FROM + cte t1 + INNER JOIN Issue3360NullInAnchor r ON t1.Id = r.Id + 100 +) +SELECT + t2.Id, + t2.Guid +FROM + cte t2 + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS Issue3360NullInAnchor + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3360_NullsInAnchor(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3360_NullsInAnchor(Informix.DB2).sql new file mode 100644 index 00000000000..bc2a0b5b1f2 --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3360_NullsInAnchor(Informix.DB2).sql @@ -0,0 +1,227 @@ +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS Issue3360Table1 + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS Issue3360Table1 +( + Id Int NOT NULL, + Byte SmallInt NOT NULL, + ByteN SmallInt NULL, + Guid VARCHAR(36) NOT NULL, + GuidN VARCHAR(36) NULL, + Enum NChar(11) NOT NULL, + EnumN NChar(11) NULL, + Bool BOOLEAN NOT NULL, + BoolN BOOLEAN NULL, + + PRIMARY KEY (Id) +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Byte SmallInt(2) -- Int16 +SET @Byte = 0 +DECLARE @ByteN SmallInt -- Int16 +SET @ByteN = NULL +DECLARE @Guid Char(36) -- StringFixedLength +SET @Guid = '00000000-0000-0000-0000-000000000000' +DECLARE @GuidN Char -- StringFixedLength +SET @GuidN = NULL +DECLARE @Enum Char(11) -- StringFixedLength +SET @Enum = 'ENUM1_VALUE' +DECLARE @EnumN Char -- StringFixedLength +SET @EnumN = NULL +DECLARE @Bool Char(1) -- StringFixedLength +SET @Bool = 'f' +DECLARE @BoolN SmallInt -- Boolean +SET @BoolN = NULL + +INSERT INTO Issue3360Table1 +( + Id, + Byte, + ByteN, + Guid, + GuidN, + Enum, + EnumN, + Bool, + BoolN +) +VALUES +( + @Id, + @Byte, + @ByteN, + @Guid, + @GuidN, + @Enum, + @EnumN, + @Bool, + @BoolN +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 2 +DECLARE @Byte SmallInt(2) -- Int16 +SET @Byte = 1 +DECLARE @ByteN SmallInt(2) -- Int16 +SET @ByteN = 2 +DECLARE @Guid Char(36) -- StringFixedLength +SET @Guid = 'bc7b663d-0fde-4327-8f92-5d8cc3a11d11' +DECLARE @GuidN Char(36) -- StringFixedLength +SET @GuidN = 'a948600d-de21-4f74-8ac2-9516b287076e' +DECLARE @Enum Char(11) -- StringFixedLength +SET @Enum = 'ENUM1_VALUE' +DECLARE @EnumN Char(11) -- StringFixedLength +SET @EnumN = 'ENUM2_VALUE' +DECLARE @Bool Char(1) -- StringFixedLength +SET @Bool = 't' +DECLARE @BoolN Char(1) -- StringFixedLength +SET @BoolN = 'f' + +INSERT INTO Issue3360Table1 +( + Id, + Byte, + ByteN, + Guid, + GuidN, + Enum, + EnumN, + Bool, + BoolN +) +VALUES +( + @Id, + @Byte, + @ByteN, + @Guid, + @GuidN, + @Enum, + @EnumN, + @Bool, + @BoolN +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 4 +DECLARE @Byte SmallInt(2) -- Int16 +SET @Byte = 3 +DECLARE @ByteN SmallInt(2) -- Int16 +SET @ByteN = 4 +DECLARE @Guid Char(36) -- StringFixedLength +SET @Guid = 'bd3973a5-4323-4dd8-9f4f-df9f93e2a627' +DECLARE @GuidN Char(36) -- StringFixedLength +SET @GuidN = 'bc7b663d-0fde-4327-8f92-5d8cc3a11d11' +DECLARE @Enum Char(11) -- StringFixedLength +SET @Enum = 'ENUM1_VALUE' +DECLARE @EnumN Char(11) -- StringFixedLength +SET @EnumN = 'ENUM2_VALUE' +DECLARE @Bool Char(1) -- StringFixedLength +SET @Bool = 'f' +DECLARE @BoolN Char(1) -- StringFixedLength +SET @BoolN = 't' + +INSERT INTO Issue3360Table1 +( + Id, + Byte, + ByteN, + Guid, + GuidN, + Enum, + EnumN, + Bool, + BoolN +) +VALUES +( + @Id, + @Byte, + @ByteN, + @Guid, + @GuidN, + @Enum, + @EnumN, + @Bool, + @BoolN +) + +BeforeExecute +-- Informix.DB2 Informix + +WITH cte +( + Id, + Byte, + ByteN, + Guid, + GuidN, + Enum, + EnumN, + Bool, + BoolN +) +AS +( + SELECT + r.Id, + NULL::SmallInt, + NULL::SmallInt, + NULL::VARCHAR(36), + NULL::VARCHAR(36), + NULL::NChar(11), + NULL::NChar(11), + NULL::BOOLEAN, + NULL::BOOLEAN + FROM + Issue3360Table1 r + WHERE + r.Id = 1 + UNION ALL + SELECT + r_1.Id, + r_1.Byte, + r_1.ByteN, + r_1.Guid, + r_1.GuidN, + r_1.Enum, + r_1.EnumN, + r_1.Bool, + r_1.BoolN + FROM + Issue3360Table1 r_1 + INNER JOIN cte parent ON r_1.Id = parent.Id + 1 +) +SELECT + t1.Id, + t1.Byte, + t1.ByteN, + t1.Guid, + t1.GuidN, + t1.Enum, + t1.EnumN, + t1.Bool, + t1.BoolN +FROM + cte t1 +ORDER BY + t1.Id + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS Issue3360Table1 + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3360_TypeByOtherQuery_AllProviders(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3360_TypeByOtherQuery_AllProviders(Informix.DB2).sql new file mode 100644 index 00000000000..82273b1145e --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3360_TypeByOtherQuery_AllProviders(Informix.DB2).sql @@ -0,0 +1,48 @@ +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS Issue3360Table + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS Issue3360Table +( + Id Int NOT NULL, + Str VarChar NULL, + + PRIMARY KEY (Id) +) + +BeforeExecute +-- Informix.DB2 Informix + +WITH cte (Id, Str) +AS +( + SELECT + p.Id, + p.Str + FROM + Issue3360Table p + UNION ALL + SELECT + t1.Id, + 'Str' + FROM + cte t1, + Issue3360Table r + WHERE + t1.Id = r.Id + 1 +) +SELECT + t2.Id, + t2.Str +FROM + cte t2 + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS Issue3360Table + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3360_TypeByProjectionProperty_AllProviders(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3360_TypeByProjectionProperty_AllProviders(Informix.DB2).sql new file mode 100644 index 00000000000..90954e750f9 --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3360_TypeByProjectionProperty_AllProviders(Informix.DB2).sql @@ -0,0 +1,46 @@ +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS Issue3360Table + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS Issue3360Table +( + Id Int NOT NULL, + Str VarChar NULL, + + PRIMARY KEY (Id) +) + +BeforeExecute +-- Informix.DB2 Informix + +WITH cte (Id, Str) +AS +( + SELECT + p.Id, + 'Str1' + FROM + Issue3360Table p + UNION ALL + SELECT + t1.Id, + 'Str2' + FROM + cte t1 + INNER JOIN Issue3360Table r ON t1.Id = r.Id + 1 +) +SELECT + t2.Id, + t2.Str +FROM + cte t2 + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS Issue3360Table + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3360_TypeStringEnum_AllProviders(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3360_TypeStringEnum_AllProviders(Informix.DB2).sql new file mode 100644 index 00000000000..b6aab17432a --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3360_TypeStringEnum_AllProviders(Informix.DB2).sql @@ -0,0 +1,44 @@ +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS Issue3360WithEnum + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS Issue3360WithEnum +( + Id Int NOT NULL, + Str VarChar(50) NOT NULL +) + +BeforeExecute +-- Informix.DB2 Informix + +WITH cte (Id, Str) +AS +( + SELECT + p.Id, + p.Str + FROM + Issue3360WithEnum p + UNION ALL + SELECT + t1.Id, + 'THIS_IS_TWO' + FROM + cte t1 + INNER JOIN Issue3360WithEnum r ON t1.Id = r.Id + 1 +) +SELECT + t2.Id, + t2.Str +FROM + cte t2 + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS Issue3360WithEnum + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3407Test(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3407Test(Informix.DB2).sql new file mode 100644 index 00000000000..ea6045bed17 --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue3407Test(Informix.DB2).sql @@ -0,0 +1,56 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 +( + ID, + FirstName, + LastName, + MiddleName, + Gender, + Patient_PersonID, + Patient_Diagnosis +) +AS +( + SELECT + t1.PersonID, + t1.FirstName, + t1.LastName, + t1.MiddleName, + t1.Gender, + a_Patient.PersonID, + a_Patient.Diagnosis + FROM + Person t1 + LEFT JOIN Patient a_Patient ON t1.PersonID = a_Patient.PersonID +) +SELECT + r.FirstName, + r.ID, + r.LastName, + r.MiddleName, + r.Gender, + r.Patient_PersonID, + r.Patient_Diagnosis +FROM + CTE_1 r +WHERE + r.ID = 2 + +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 (ID) +AS +( + SELECT + t1.PersonID + FROM + Person t1 +) +SELECT + COUNT(*) +FROM + CTE_1 t2 + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue4167(Informix.DB2,False).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue4167(Informix.DB2,False).sql new file mode 100644 index 00000000000..a725eddf4bb --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue4167(Informix.DB2,False).sql @@ -0,0 +1,133 @@ +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS Issue4167Table + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS Issue4167Table +( + ID Int NOT NULL, + "Value" NVarChar(255) NULL, + EnumValue Int NULL, + + PRIMARY KEY (ID) +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @ID Integer(4) -- Int32 +SET @ID = 1 +DECLARE @Value VarChar(6) -- String +SET @Value = '000001' +DECLARE @EnumValue Integer(4) -- Int32 +SET @EnumValue = 0 + +INSERT INTO Issue4167Table +( + ID, + "Value", + EnumValue +) +VALUES +( + @ID, + @Value, + @EnumValue +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @ID Integer(4) -- Int32 +SET @ID = 2 +DECLARE @Value VarChar(6) -- String +SET @Value = '000001' +DECLARE @EnumValue Integer(4) -- Int32 +SET @EnumValue = 3 + +INSERT INTO Issue4167Table +( + ID, + "Value", + EnumValue +) +VALUES +( + @ID, + @Value, + @EnumValue +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @ID Integer(4) -- Int32 +SET @ID = 3 +DECLARE @Value VarChar(6) -- String +SET @Value = '000001' +DECLARE @EnumValue Integer -- Int32 +SET @EnumValue = NULL + +INSERT INTO Issue4167Table +( + ID, + "Value", + EnumValue +) +VALUES +( + @ID, + @Value, + @EnumValue +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @ID Integer(4) -- Int32 +SET @ID = 4 +DECLARE @Value VarChar(6) -- String +SET @Value = '000002' +DECLARE @EnumValue Integer(4) -- Int32 +SET @EnumValue = 0 + +INSERT INTO Issue4167Table +( + ID, + "Value", + EnumValue +) +VALUES +( + @ID, + @Value, + @EnumValue +) + +BeforeExecute +-- Informix.DB2 Informix + +SELECT + t1.EnumValue +FROM + ( + SELECT + CASE + WHEN g_1.EnumValue IS NOT NULL THEN g_1.EnumValue + ELSE 0 + END as EnumValue + FROM + Issue4167Table g_1 + WHERE + g_1."Value" = '000001' + GROUP BY + g_1."Value", + g_1.EnumValue + ) t1 +ORDER BY + t1.EnumValue + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS Issue4167Table + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue4167(Informix.DB2,True).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue4167(Informix.DB2,True).sql new file mode 100644 index 00000000000..70b2c2d13df --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Issue4167(Informix.DB2,True).sql @@ -0,0 +1,136 @@ +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS Issue4167Table + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS Issue4167Table +( + ID Int NOT NULL, + "Value" NVarChar(255) NULL, + EnumValue Int NULL, + + PRIMARY KEY (ID) +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @ID Integer(4) -- Int32 +SET @ID = 1 +DECLARE @Value VarChar(6) -- String +SET @Value = '000001' +DECLARE @EnumValue Integer(4) -- Int32 +SET @EnumValue = 0 + +INSERT INTO Issue4167Table +( + ID, + "Value", + EnumValue +) +VALUES +( + @ID, + @Value, + @EnumValue +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @ID Integer(4) -- Int32 +SET @ID = 2 +DECLARE @Value VarChar(6) -- String +SET @Value = '000001' +DECLARE @EnumValue Integer(4) -- Int32 +SET @EnumValue = 3 + +INSERT INTO Issue4167Table +( + ID, + "Value", + EnumValue +) +VALUES +( + @ID, + @Value, + @EnumValue +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @ID Integer(4) -- Int32 +SET @ID = 3 +DECLARE @Value VarChar(6) -- String +SET @Value = '000001' +DECLARE @EnumValue Integer -- Int32 +SET @EnumValue = NULL + +INSERT INTO Issue4167Table +( + ID, + "Value", + EnumValue +) +VALUES +( + @ID, + @Value, + @EnumValue +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @ID Integer(4) -- Int32 +SET @ID = 4 +DECLARE @Value VarChar(6) -- String +SET @Value = '000002' +DECLARE @EnumValue Integer(4) -- Int32 +SET @EnumValue = 0 + +INSERT INTO Issue4167Table +( + ID, + "Value", + EnumValue +) +VALUES +( + @ID, + @Value, + @EnumValue +) + +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 (EnumValue) +AS +( + SELECT + CASE + WHEN g_1.EnumValue IS NOT NULL THEN g_1.EnumValue + ELSE 0 + END + FROM + Issue4167Table g_1 + WHERE + g_1."Value" = '000001' + GROUP BY + g_1."Value", + g_1.EnumValue +) +SELECT + t1.EnumValue +FROM + CTE_1 t1 +ORDER BY + t1.EnumValue + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS Issue4167Table + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.RecursiveCount(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.RecursiveCount(Informix.DB2).sql new file mode 100644 index 00000000000..22129f24ef7 --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.RecursiveCount(Informix.DB2).sql @@ -0,0 +1,386 @@ +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS HierarchyTree + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS HierarchyTree +( + Id Int NOT NULL, + ParentId Int NULL +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @ParentId Integer -- Int32 +SET @ParentId = NULL + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 2 +DECLARE @ParentId Integer -- Int32 +SET @ParentId = NULL + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 10 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 1 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 11 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 1 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 20 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 2 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 22 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 2 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 100 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 10 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 101 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 10 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 102 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 10 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 110 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 11 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 111 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 11 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 112 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 11 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 200 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 20 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 201 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 20 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 202 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 20 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 210 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 21 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 211 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 21 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 212 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 21 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 (Id) +AS +( + SELECT + t.Id + FROM + HierarchyTree t + WHERE + t.ParentId IS NULL +), +CTE_2 (ParentId, Id) +AS +( + SELECT + t1.ParentId, + t1.Id + FROM + HierarchyTree t1 +), +hierarchyDown (Level_1, Id) +AS +( + SELECT + 0, + t2.Id + FROM + CTE_1 t2 + UNION ALL + SELECT + t3.Level_1 + 1, + t_1.Id + FROM + hierarchyDown t3 + INNER JOIN CTE_2 t_1 ON t_1.ParentId = t3.Id +) +SELECT + COUNT(*) +FROM + hierarchyDown t4 + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS HierarchyTree + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.RecursiveDeepNesting(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.RecursiveDeepNesting(Informix.DB2).sql new file mode 100644 index 00000000000..50dca40696e --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.RecursiveDeepNesting(Informix.DB2).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS HierarchyTree + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS HierarchyTree +( + Id Int NOT NULL, + ParentId Int NULL +) + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS HierarchyTree + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.RecursiveTest2(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.RecursiveTest2(Informix.DB2).sql new file mode 100644 index 00000000000..be445d1f03c --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.RecursiveTest2(Informix.DB2).sql @@ -0,0 +1,389 @@ +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS HierarchyTree + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS HierarchyTree +( + Id Int NOT NULL, + ParentId Int NULL +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @ParentId Integer -- Int32 +SET @ParentId = NULL + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 2 +DECLARE @ParentId Integer -- Int32 +SET @ParentId = NULL + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 10 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 1 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 11 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 1 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 20 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 2 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 22 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 2 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 100 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 10 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 101 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 10 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 102 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 10 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 110 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 11 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 111 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 11 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 112 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 11 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 200 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 20 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 201 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 20 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 202 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 20 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 210 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 21 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 211 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 21 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 212 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 21 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 (Id) +AS +( + SELECT + t.Id + FROM + HierarchyTree t + WHERE + t.ParentId IS NULL +), +CTE_2 (ParentId, Id) +AS +( + SELECT + t1.ParentId, + t1.Id + FROM + HierarchyTree t1 +), +hierarchyDown (Level_1, Id) +AS +( + SELECT + 0, + t2.Id + FROM + CTE_1 t2 + UNION ALL + SELECT + t3.Level_1 + 1, + t_1.Id + FROM + hierarchyDown t3 + INNER JOIN CTE_2 t_1 ON t_1.ParentId = t3.Id +) +SELECT + t4.Id, + t4.Level_1 +FROM + hierarchyDown t4 +ORDER BY + t4.Id + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS HierarchyTree + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Test1(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Test1(Informix.DB2).sql new file mode 100644 index 00000000000..b6efd8c45e5 --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Test1(Informix.DB2).sql @@ -0,0 +1,34 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 (ParentID) +AS +( + SELECT + c_1.ParentID + FROM + Child c_1 + WHERE + c_1.ParentID > 1 +) +SELECT + p.ParentID, + p.Value1 +FROM + Parent p + INNER JOIN CTE_1 c_2 ON p.ParentID = c_2.ParentID + INNER JOIN CTE_1 c2 ON p.ParentID = c2.ParentID + +BeforeExecute +-- Informix.DB2 Informix + +SELECT + p.ParentID, + p.Value1 +FROM + Parent p + INNER JOIN Child c_1 ON p.ParentID = c_1.ParentID + INNER JOIN Child c2 ON p.ParentID = c2.ParentID +WHERE + c_1.ParentID > 1 AND c2.ParentID > 1 + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Test2(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Test2(Informix.DB2).sql new file mode 100644 index 00000000000..b7072844711 --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Test2(Informix.DB2).sql @@ -0,0 +1,117 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE1_ (ParentID) +AS +( + SELECT + c_1.ParentID + FROM + Child c_1 + WHERE + c_1.ParentID > 1 +), +LATEST (ParentID, ChildID) +AS +( + SELECT + c4.ParentID, + c4.ChildID + FROM + Child c4 + WHERE + Mod(c4.ParentID, 2) = 0 +), +CTE2_ (ParentID) +AS +( + SELECT + p.ParentID + FROM + Parent p + WHERE + EXISTS( + SELECT + * + FROM + CTE1_ c_2 + WHERE + c_2.ParentID = p.ParentID + ) +), +CTE3_ (ParentID, Value1) +AS +( + SELECT + p_1.ParentID, + p_1.Value1 + FROM + Parent p_1 + WHERE + EXISTS( + SELECT + * + FROM + CTE2_ c_3 + WHERE + c_3.ParentID = p_1.ParentID + ) +) +SELECT + c3.ParentID, + c3.Value1 +FROM + CTE2_ t1 + INNER JOIN CTE1_ c_4 ON t1.ParentID = c_4.ParentID + INNER JOIN CTE2_ c2 ON t1.ParentID = c2.ParentID + INNER JOIN CTE3_ c3 ON t1.ParentID = c3.ParentID + INNER JOIN LATEST c4_1 ON c4_1.ParentID = c3.ParentID + +BeforeExecute +-- Informix.DB2 Informix + +SELECT + c3.ParentID, + c3.Value1 +FROM + Parent p + INNER JOIN Child c_1 ON p.ParentID = c_1.ParentID + INNER JOIN Parent c2 ON p.ParentID = c2.ParentID + INNER JOIN Parent c3 ON p.ParentID = c3.ParentID + INNER JOIN Child c4 ON c4.ParentID = c3.ParentID +WHERE + EXISTS( + SELECT + * + FROM + Child c_2 + WHERE + c_2.ParentID > 1 AND c_2.ParentID = p.ParentID + ) AND + c_1.ParentID > 1 AND + EXISTS( + SELECT + * + FROM + Child c_3 + WHERE + c_3.ParentID > 1 AND c_3.ParentID = c2.ParentID + ) AND + EXISTS( + SELECT + * + FROM + Parent p_1 + WHERE + EXISTS( + SELECT + * + FROM + Child c_4 + WHERE + c_4.ParentID > 1 AND c_4.ParentID = p_1.ParentID + ) AND + p_1.ParentID = c3.ParentID + ) AND + Mod(c4.ParentID, 2) = 0 + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Test4(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Test4(Informix.DB2).sql new file mode 100644 index 00000000000..b91b7a0e41e --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Test4(Informix.DB2).sql @@ -0,0 +1,43 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE1_ (ParentID) +AS +( + SELECT + c_1.ParentID + FROM + Child c_1 + WHERE + c_1.ParentID > 1 +), +LAST0 (ParentID, ChildID) +AS +( + SELECT + c4.ParentID, + c4.ChildID + FROM + Child c4 + WHERE + Mod(c4.ParentID, 2) = 0 +) +SELECT + c4_1.ParentID, + c4_1.ChildID +FROM + CTE1_ p + INNER JOIN LAST0 c4_1 ON c4_1.ParentID = p.ParentID + +BeforeExecute +-- Informix.DB2 Informix + +SELECT + c4.ParentID, + c4.ChildID +FROM + Child p + INNER JOIN Child c4 ON c4.ParentID = p.ParentID +WHERE + p.ParentID > 1 AND Mod(c4.ParentID, 2) = 0 + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Test5(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Test5(Informix.DB2).sql new file mode 100644 index 00000000000..be500b4724b --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.Test5(Informix.DB2).sql @@ -0,0 +1,52 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 (ParentID) +AS +( + SELECT + t1.ParentID + FROM + ( + SELECT DISTINCT + c_1.ParentID, + c_1.ChildID + FROM + Child c_1 + WHERE + c_1.ParentID > 1 + ) t1 +) +SELECT + COUNT(*) +FROM + Parent p + INNER JOIN CTE_1 c_2 ON p.ParentID = c_2.ParentID + INNER JOIN CTE_1 c2 ON p.ParentID = c2.ParentID + +BeforeExecute +-- Informix.DB2 Informix + +SELECT + COUNT(*) +FROM + Parent p + INNER JOIN ( + SELECT DISTINCT + c_1.ParentID, + c_1.ChildID + FROM + Child c_1 + WHERE + c_1.ParentID > 1 + ) c_2 ON p.ParentID = c_2.ParentID + INNER JOIN ( + SELECT DISTINCT + c2.ParentID, + c2.ChildID + FROM + Child c2 + WHERE + c2.ParentID > 1 + ) c2_1 ON p.ParentID = c2_1.ParentID + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.TestAsTable(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.TestAsTable(Informix.DB2).sql new file mode 100644 index 00000000000..5b59519dd4f --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.TestAsTable(Informix.DB2).sql @@ -0,0 +1,27 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE1_ (ParentID, ChildID) +AS +( + SELECT + t1.ParentID, + t1.ChildID + FROM + Child t1 +) +SELECT + t2.ParentID, + t2.ChildID +FROM + CTE1_ t2 + +BeforeExecute +-- Informix.DB2 Informix + +SELECT + t1.ParentID, + t1.ChildID +FROM + Child t1 + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.TestCustomCount(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.TestCustomCount(Informix.DB2).sql new file mode 100644 index 00000000000..3a6af0bec3a --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.TestCustomCount(Informix.DB2).sql @@ -0,0 +1,19 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 (ParentID, ChildID) +AS +( + SELECT DISTINCT + c_1.ParentID, + c_1.ChildID + FROM + Child c_1 + WHERE + c_1.ParentID > 1 +) +SELECT + COUNT(*) +FROM + CTE_1 t1 + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.TestDoubleRecursion(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.TestDoubleRecursion(Informix.DB2).sql new file mode 100644 index 00000000000..01e7deaea12 --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.TestDoubleRecursion(Informix.DB2).sql @@ -0,0 +1,387 @@ +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS HierarchyTree + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS HierarchyTree +( + Id Int NOT NULL, + ParentId Int NULL +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @ParentId Integer -- Int32 +SET @ParentId = NULL + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 2 +DECLARE @ParentId Integer -- Int32 +SET @ParentId = NULL + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 10 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 1 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 11 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 1 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 20 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 2 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 22 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 2 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 100 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 10 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 101 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 10 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 102 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 10 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 110 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 11 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 111 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 11 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 112 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 11 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 200 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 20 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 201 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 20 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 202 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 20 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 210 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 21 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 211 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 21 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 212 +DECLARE @ParentId Integer(4) -- Int32 +SET @ParentId = 21 + +INSERT INTO HierarchyTree +( + Id, + ParentId +) +VALUES +( + @Id, + @ParentId +) + +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 (Id) +AS +( + SELECT + t.Id + FROM + HierarchyTree t + WHERE + t.ParentId IS NULL +), +CTE_2 (ParentId, Id) +AS +( + SELECT + t1.ParentId, + t1.Id + FROM + HierarchyTree t1 +), +hierarchyDown (Level_1, Id) +AS +( + SELECT + 0, + t2.Id + FROM + CTE_1 t2 + UNION ALL + SELECT + t3.Level_1 + 1, + t_1.Id + FROM + hierarchyDown t3 + INNER JOIN CTE_2 t_1 ON t_1.ParentId = t3.Id +) +SELECT + COUNT(*) +FROM + hierarchyDown t4 + INNER JOIN hierarchyDown h2 ON h2.Id = t4.Id + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS HierarchyTree + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.TestEmbedded(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.TestEmbedded(Informix.DB2).sql new file mode 100644 index 00000000000..45e2bc65747 --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.TestEmbedded(Informix.DB2).sql @@ -0,0 +1,50 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 (ChildID) +AS +( + SELECT + c_1.ChildID + FROM + Child c_1 +), +CTE_2 (ChildID) +AS +( + SELECT DISTINCT + t1.ChildID + FROM + CTE_1 t1 +), +CTE_3 (ChildID) +AS +( + SELECT DISTINCT + t2.ChildID + FROM + CTE_2 t2 +), +CTE_4 (ChildID) +AS +( + SELECT DISTINCT + t3.ChildID + FROM + CTE_3 t3 +) +SELECT + w.ParentID, + w.ChildID +FROM + Child w +WHERE + NOT EXISTS( + SELECT + * + FROM + CTE_4 t4 + WHERE + w.ChildID = t4.ChildID + ) + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.TestNesting(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.TestNesting(Informix.DB2).sql new file mode 100644 index 00000000000..bab09ccf6ae --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.TestNesting(Informix.DB2).sql @@ -0,0 +1,77 @@ +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS NestingA + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS NestingA +( + Property1 NVarChar(255) NULL +) + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS NestingB + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS NestingB +( + Property1 NVarChar(255) NULL, + Property2 NVarChar(255) NULL +) + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS NestingC + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS NestingC +( + Property1 NVarChar(255) NULL, + Property2 NVarChar(255) NULL, + Property3 NVarChar(255) NULL +) + +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 (Property1) +AS +( + SELECT + a.Property2 + FROM + NestingC a +) +SELECT + c2.Property1, + t_1.Property2, + t_1.Property3 +FROM + CTE_1 c2 + CROSS JOIN NestingC t + CROSS JOIN NestingC t_1 + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS NestingC + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS NestingB + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS NestingA + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.TestNoColumns(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.TestNoColumns(Informix.DB2).sql new file mode 100644 index 00000000000..fa9f5c34ce8 --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.TestNoColumns(Informix.DB2).sql @@ -0,0 +1,63 @@ +BeforeExecute +-- Informix.DB2 Informix + +SELECT + COUNT(*) +FROM + Child t1 + +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE1_ (ParentID, ChildID) +AS +( + SELECT + t1.ParentID, + t1.ChildID + FROM + Child t1 +) +SELECT + COUNT(*) +FROM + CTE1_ t2 + +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE1_ (C_ChildID) +AS +( + SELECT + c_1.ChildID + FROM + Child c_1 +) +SELECT + COUNT(*) +FROM + CTE1_ t1 + +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE1_ AS +( + SELECT + * + FROM + Child c_1 +) +SELECT + CASE + WHEN EXISTS( + SELECT + * + FROM + CTE1_ t1 + ) THEN 't' + ELSE 'f' + END::BOOLEAN +FROM table(set{1}) + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.TestRecursiveScalar(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.TestRecursiveScalar(Informix.DB2).sql new file mode 100644 index 00000000000..5771a602e65 --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.TestRecursiveScalar(Informix.DB2).sql @@ -0,0 +1,29 @@ +BeforeExecute +-- Informix.DB2 Informix +DECLARE @take Integer(4) -- Int32 +SET @take = 1 + +WITH MY_CTE (field) +AS +( + SELECT + t1.ChildID + FROM + ( + SELECT FIRST @take + c_1.ChildID + FROM + Child c_1 + ) t1 + UNION ALL + SELECT + t2.ChildID + 1 + FROM + Child t2 + INNER JOIN MY_CTE ct ON ct.field = t2.ChildID + 1 +) +SELECT + t3.field +FROM + MY_CTE t3 + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.TestWithWrapper(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.TestWithWrapper(Informix.DB2).sql new file mode 100644 index 00000000000..013da9f55e4 --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.TestWithWrapper(Informix.DB2).sql @@ -0,0 +1,33 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 (Child_ParentID, Child_ChildID) +AS +( + SELECT + child_1.ParentID, + child_1.ChildID + FROM + Child child_1 +) +SELECT + p.ParentID, + p.Value1, + c_1.Child_ParentID, + c_1.Child_ChildID +FROM + Parent p + INNER JOIN CTE_1 c_1 ON p.ParentID = c_1.Child_ParentID + +BeforeExecute +-- Informix.DB2 Informix + +SELECT + p.ParentID, + p.Value1, + c_1.ParentID, + c_1.ChildID +FROM + Parent p + INNER JOIN Child c_1 ON p.ParentID = c_1.ParentID + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.TestWithWrapperUnion(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.TestWithWrapperUnion(Informix.DB2).sql new file mode 100644 index 00000000000..d06f252ac1a --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.TestWithWrapperUnion(Informix.DB2).sql @@ -0,0 +1,80 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 +( + Child_ParentID, + Child_ChildID, + Parent_ParentID, + Parent_Value1 +) +AS +( + SELECT + child_1.ParentID, + child_1.ChildID, + a_Parent.ParentID, + a_Parent.Value1 + FROM + Child child_1 + LEFT JOIN Parent a_Parent ON child_1.ParentID = a_Parent.ParentID +) +SELECT + a_Parent_1.ParentID, + a_Parent_1.ParentID, + a_Parent_1.Value1, + child_2.ParentID, + child_2.ChildID +FROM + Child child_2 + LEFT JOIN Parent a_Parent_1 ON child_2.ParentID = a_Parent_1.ParentID +UNION +SELECT + t1.Parent_ParentID, + t1.Parent_ParentID, + t1.Parent_Value1, + t1.Child_ParentID, + t1.Child_ChildID +FROM + CTE_1 t1 + +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 +( + Child_ParentID, + Child_ChildID, + Parent_ParentID, + Parent_Value1 +) +AS +( + SELECT + child_1.ParentID, + child_1.ChildID, + a_Parent.ParentID, + a_Parent.Value1 + FROM + Child child_1 + LEFT JOIN Parent a_Parent ON child_1.ParentID = a_Parent.ParentID +) +SELECT + t1.Child_ParentID, + t1.Child_ChildID, + t1.Parent_ParentID, + t1.Parent_ParentID, + t1.Parent_Value1 +FROM + CTE_1 t1 +UNION +SELECT + child_2.ParentID, + child_2.ChildID, + a_Parent_1.ParentID, + a_Parent_1.ParentID, + a_Parent_1.Value1 +FROM + Child child_2 + LEFT JOIN Parent a_Parent_1 ON child_2.ParentID = a_Parent_1.ParentID + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.WithLimitedOrderBy(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.WithLimitedOrderBy(Informix.DB2).sql new file mode 100644 index 00000000000..47106b629a0 --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.WithLimitedOrderBy(Informix.DB2).sql @@ -0,0 +1,22 @@ +BeforeExecute +-- Informix.DB2 Informix +DECLARE @take Integer(4) -- Int32 +SET @take = 3 + +WITH CTE_1 (ParentID, Value1) +AS +( + SELECT FIRST @take + t1.ParentID, + t1.Value1 + FROM + Parent t1 + ORDER BY + t1.ParentID DESC +) +SELECT + t2.ParentID, + t2.Value1 +FROM + CTE_1 t2 + diff --git a/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.WithOrderBy(Informix.DB2).sql b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.WithOrderBy(Informix.DB2).sql new file mode 100644 index 00000000000..1c97f51fab3 --- /dev/null +++ b/Informix.DB2/Tests/Linq/CteTests/Tests.Linq.CteTests.WithOrderBy(Informix.DB2).sql @@ -0,0 +1,20 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 (ParentID, Value1) +AS +( + SELECT + t1.ParentID, + t1.Value1 + FROM + Parent t1 + ORDER BY + t1.ParentID DESC +) +SELECT + t2.ParentID, + t2.Value1 +FROM + CTE_1 t2 + diff --git a/Informix.DB2/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Issue4098WithCte(Informix.DB2).sql b/Informix.DB2/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Issue4098WithCte(Informix.DB2).sql new file mode 100644 index 00000000000..ebb22a4022c --- /dev/null +++ b/Informix.DB2/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Issue4098WithCte(Informix.DB2).sql @@ -0,0 +1,376 @@ +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS "Transaction" + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS "Transaction" +( + InvestorId NVarChar(255) NULL, + SecurityClass NVarChar(255) NOT NULL, + Units Int NOT NULL +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @InvestorId VarChar(4) -- String +SET @InvestorId = 'inv1' +DECLARE @SecurityClass VarChar(4) -- String +SET @SecurityClass = 'test' +DECLARE @Units Integer(4) -- Int32 +SET @Units = 100 + +INSERT INTO "Transaction" +( + InvestorId, + SecurityClass, + Units +) +VALUES +( + @InvestorId, + @SecurityClass, + @Units +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @InvestorId VarChar(4) -- String +SET @InvestorId = 'inv1' +DECLARE @SecurityClass VarChar(4) -- String +SET @SecurityClass = 'test' +DECLARE @Units Integer(4) -- Int32 +SET @Units = 200 + +INSERT INTO "Transaction" +( + InvestorId, + SecurityClass, + Units +) +VALUES +( + @InvestorId, + @SecurityClass, + @Units +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @InvestorId VarChar(4) -- String +SET @InvestorId = 'inv2' +DECLARE @SecurityClass VarChar(4) -- String +SET @SecurityClass = 'test' +DECLARE @Units Integer(4) -- Int32 +SET @Units = 300 + +INSERT INTO "Transaction" +( + InvestorId, + SecurityClass, + Units +) +VALUES +( + @InvestorId, + @SecurityClass, + @Units +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @InvestorId VarChar(4) -- String +SET @InvestorId = 'inv2' +DECLARE @SecurityClass VarChar(4) -- String +SET @SecurityClass = 'test' +DECLARE @Units Integer(4) -- Int32 +SET @Units = 400 + +INSERT INTO "Transaction" +( + InvestorId, + SecurityClass, + Units +) +VALUES +( + @InvestorId, + @SecurityClass, + @Units +) + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS InvestorPayment + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS InvestorPayment +( + Id Int NOT NULL, + InvestorId NVarChar(255) NOT NULL, + NetPayment Int NOT NULL +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @InvestorId VarChar(4) -- String +SET @InvestorId = 'inv1' +DECLARE @NetPayment Integer(4) -- Int32 +SET @NetPayment = 100 + +INSERT INTO InvestorPayment +( + Id, + InvestorId, + NetPayment +) +VALUES +( + @Id, + @InvestorId, + @NetPayment +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 2 +DECLARE @InvestorId VarChar(4) -- String +SET @InvestorId = 'inv2' +DECLARE @NetPayment Integer(4) -- Int32 +SET @NetPayment = 200 + +INSERT INTO InvestorPayment +( + Id, + InvestorId, + NetPayment +) +VALUES +( + @Id, + @InvestorId, + @NetPayment +) + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS PaymentEvent + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS PaymentEvent +( + Id Int NOT NULL, + Description NVarChar(255) NULL, + SecurityClass NVarChar(255) NOT NULL +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @Description VarChar(3) -- String +SET @Description = 'one' +DECLARE @SecurityClass VarChar(4) -- String +SET @SecurityClass = 'test' + +INSERT INTO PaymentEvent +( + Id, + Description, + SecurityClass +) +VALUES +( + @Id, + @Description, + @SecurityClass +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 2 +DECLARE @Description VarChar(3) -- String +SET @Description = 'two' +DECLARE @SecurityClass VarChar(4) -- String +SET @SecurityClass = 'test' + +INSERT INTO PaymentEvent +( + Id, + Description, + SecurityClass +) +VALUES +( + @Id, + @Description, + @SecurityClass +) + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS InvestorPaymentDetail + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS InvestorPaymentDetail +( + InvestorId NVarChar(255) NULL, + CalculationId Int NOT NULL +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @InvestorId VarChar(4) -- String +SET @InvestorId = 'inv1' +DECLARE @CalculationId Integer(4) -- Int32 +SET @CalculationId = 1 + +INSERT INTO InvestorPaymentDetail +( + InvestorId, + CalculationId +) +VALUES +( + @InvestorId, + @CalculationId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @InvestorId VarChar(4) -- String +SET @InvestorId = 'inv2' +DECLARE @CalculationId Integer(4) -- Int32 +SET @CalculationId = 2 + +INSERT INTO InvestorPaymentDetail +( + InvestorId, + CalculationId +) +VALUES +( + @InvestorId, + @CalculationId +) + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS PaymentCalculation + +BeforeExecute +-- Informix.DB2 Informix + +CREATE TABLE IF NOT EXISTS PaymentCalculation +( + Id Int NOT NULL, + EventId Int NOT NULL +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 1 +DECLARE @EventId Integer(4) -- Int32 +SET @EventId = 1 + +INSERT INTO PaymentCalculation +( + Id, + EventId +) +VALUES +( + @Id, + @EventId +) + +BeforeExecute +-- Informix.DB2 Informix +DECLARE @Id Integer(4) -- Int32 +SET @Id = 2 +DECLARE @EventId Integer(4) -- Int32 +SET @EventId = 2 + +INSERT INTO PaymentCalculation +( + Id, + EventId +) +VALUES +( + @Id, + @EventId +) + +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 (InvestorId, SecurityClass, Units) +AS +( + SELECT + g_1.InvestorId, + g_1.SecurityClass, + SUM(g_1.Units) + FROM + "Transaction" g_1 + GROUP BY + g_1.SecurityClass, + g_1.InvestorId +) +SELECT + ip.InvestorId, + b.Units, + SUM(ip.NetPayment) +FROM + PaymentEvent g_2 + INNER JOIN InvestorPayment ip ON g_2.Id = ip.Id + INNER JOIN InvestorPaymentDetail ipd ON ip.InvestorId = ipd.InvestorId + INNER JOIN PaymentCalculation pc ON ipd.CalculationId = pc.Id AND g_2.Id = pc.EventId + INNER JOIN CTE_1 b ON ip.InvestorId = b.InvestorId AND g_2.SecurityClass = b.SecurityClass +GROUP BY + ip.InvestorId, + b.Units + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS PaymentCalculation + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS InvestorPaymentDetail + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS PaymentEvent + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS InvestorPayment + +BeforeExecute +-- Informix.DB2 Informix + +DROP TABLE IF EXISTS "Transaction" + diff --git a/Informix.DB2/Tests/Linq/IdentifierTests/Tests.Linq.IdentifierTests.TestAliasLengthName_Latin(Informix.DB2).sql b/Informix.DB2/Tests/Linq/IdentifierTests/Tests.Linq.IdentifierTests.TestAliasLengthName_Latin(Informix.DB2).sql new file mode 100644 index 00000000000..466c2b8a7bc --- /dev/null +++ b/Informix.DB2/Tests/Linq/IdentifierTests/Tests.Linq.IdentifierTests.TestAliasLengthName_Latin(Informix.DB2).sql @@ -0,0 +1,14 @@ +BeforeExecute +-- Informix.DB2 Informix + +SELECT + abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd.FirstName, + abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd.PersonID, + abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd.LastName, + abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd.MiddleName, + abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd.Gender +FROM + Person abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd +WHERE + abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd.PersonID = 1 + diff --git a/Informix.DB2/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteExpressionIsNotATable(Informix.DB2).sql b/Informix.DB2/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteExpressionIsNotATable(Informix.DB2).sql new file mode 100644 index 00000000000..f96fb4a829b --- /dev/null +++ b/Informix.DB2/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteExpressionIsNotATable(Informix.DB2).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 +( + entry_ID, + entry_FirstName, + entry_LastName, + entry_MiddleName, + entry_Gender +) +AS +( + SELECT + person_1.PersonID, + person_1.FirstName, + person_1.LastName, + person_1.MiddleName, + person_1.Gender + FROM + Person person_1 +) +SELECT + x.entry_FirstName, + x.entry_ID, + x.entry_LastName, + x.entry_MiddleName, + x.entry_Gender +FROM + CTE_1 x +WHERE + x.entry_ID = 1 + +BeforeExecute +-- Informix.DB2 Informix + +SELECT + x.FirstName, + x.PersonID, + x.LastName, + x.MiddleName, + x.Gender +FROM + Person x +WHERE + x.PersonID = 1 + diff --git a/Informix.DB2/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteInvalidMapping(Informix.DB2).sql b/Informix.DB2/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteInvalidMapping(Informix.DB2).sql new file mode 100644 index 00000000000..701abb4d3aa --- /dev/null +++ b/Informix.DB2/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteInvalidMapping(Informix.DB2).sql @@ -0,0 +1,47 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 +( + entry_FirstName, + entry_ID, + entry_LastName, + entry_MiddleName, + entry_Gender, + rn +) +AS +( + SELECT + x.FirstName, + x.PersonID, + x.LastName, + x.MiddleName, + x.Gender, + 1 + FROM + Person x +) +SELECT FIRST 1 + t1.entry_FirstName, + t1.entry_ID, + t1.entry_LastName, + t1.entry_MiddleName, + t1.entry_Gender, + t1.rn +FROM + CTE_1 t1 + +BeforeExecute +-- Informix.DB2 Informix + +SELECT FIRST 1 + person_1.FirstName, + person_1.PersonID, + person_1.LastName, + person_1.MiddleName, + person_1.Gender, + 1 +FROM + Person person_1 + diff --git a/Informix.DB2/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteInvalidMappingUnion(Informix.DB2).sql b/Informix.DB2/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteInvalidMappingUnion(Informix.DB2).sql new file mode 100644 index 00000000000..fba7db8adcd --- /dev/null +++ b/Informix.DB2/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteInvalidMappingUnion(Informix.DB2).sql @@ -0,0 +1,91 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 +( + entry_FirstName, + entry_ID, + entry_LastName, + entry_MiddleName, + entry_Gender, + rn +) +AS +( + SELECT + x_1.FirstName, + x_1.ID, + x_1.LastName, + x_1.MiddleName, + x_1.Gender, + x_1.rn + FROM + ( + SELECT + 1 as rn, + x.FirstName, + x.PersonID as ID, + x.LastName, + x.MiddleName, + x.Gender + FROM + Person x + UNION ALL + SELECT + 2 as rn, + person_1.FirstName, + person_1.PersonID as ID, + person_1.LastName, + person_1.MiddleName, + person_1.Gender + FROM + Person person_1 + ) x_1 + WHERE + x_1.rn = 1 +) +SELECT FIRST 1 + t1.entry_FirstName, + t1.entry_ID, + t1.entry_LastName, + t1.entry_MiddleName, + t1.entry_Gender, + t1.rn +FROM + CTE_1 t1 + +BeforeExecute +-- Informix.DB2 Informix + +SELECT FIRST 1 + t1.FirstName, + t1.ID, + t1.LastName, + t1.MiddleName, + t1.Gender, + t1.rn +FROM + ( + SELECT + 1 as rn, + x.FirstName, + x.PersonID as ID, + x.LastName, + x.MiddleName, + x.Gender + FROM + Person x + UNION ALL + SELECT + 2 as rn, + person_1.FirstName, + person_1.PersonID as ID, + person_1.LastName, + person_1.MiddleName, + person_1.Gender + FROM + Person person_1 + ) t1 +WHERE + t1.rn = 1 + diff --git a/Informix.DB2/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteNoFieldList(Informix.DB2).sql b/Informix.DB2/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteNoFieldList(Informix.DB2).sql new file mode 100644 index 00000000000..9f50e5134e8 --- /dev/null +++ b/Informix.DB2/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteNoFieldList(Informix.DB2).sql @@ -0,0 +1,43 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH cte +( + FirstName, + ID, + LastName, + MiddleName, + Gender +) +AS +( + SELECT + x.FirstName, + x.PersonID, + x.LastName, + x.MiddleName, + x.Gender + FROM + Person x +) +SELECT + t1.FirstName, + t1.ID, + t1.LastName, + t1.MiddleName, + t1.Gender +FROM + cte t1 + +BeforeExecute +-- Informix.DB2 Informix + +SELECT + x.FirstName, + x.PersonID, + x.LastName, + x.MiddleName, + x.Gender +FROM + Person x + diff --git a/Informix.DB2/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteReservedWords(Informix.DB2).sql b/Informix.DB2/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteReservedWords(Informix.DB2).sql new file mode 100644 index 00000000000..51471d1cfdf --- /dev/null +++ b/Informix.DB2/Tests/UserTests/Issue1284Tests/Tests.UserTests.Issue1284Tests.TestCteReservedWords(Informix.DB2).sql @@ -0,0 +1,24 @@ +BeforeExecute +-- Informix.DB2 Informix + +WITH CTE_1 (Obj_Operator) +AS +( + SELECT + x.LastName + FROM + Person x +) +SELECT FIRST 1 + t1.Obj_Operator +FROM + CTE_1 t1 + +BeforeExecute +-- Informix.DB2 Informix + +SELECT FIRST 1 + person_1.LastName +FROM + Person person_1 + diff --git a/MySql.5.7/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsyncCanceled(MySql.5.7).sql b/MySql.5.7/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsyncCanceled(MySql.5.7).sql index 8d22b1f4847..38538fa5ed3 100644 --- a/MySql.5.7/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsyncCanceled(MySql.5.7).sql +++ b/MySql.5.7/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsyncCanceled(MySql.5.7).sql @@ -19,36 +19,6 @@ CREATE TEMPORARY TABLE `TempTable` `ID` INT NOT NULL ) -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) - -INSERT INTO `TempTable` -( - `ID` -) -VALUES -(1), -(2), -(3), -(4), -(5), -(6), -(7) - -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -SELECT - `t`.`ID` -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` - BeforeExecute -- MySql.5.7 MySql.5.7.MySql.Data MySql57 diff --git a/MySql.5.7/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsyncCanceled2(MySql.5.7).sql b/MySql.5.7/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsyncCanceled2(MySql.5.7).sql index 0058e64f1e7..fe3cd889905 100644 --- a/MySql.5.7/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsyncCanceled2(MySql.5.7).sql +++ b/MySql.5.7/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsyncCanceled2(MySql.5.7).sql @@ -23,15 +23,6 @@ SELECT FROM `Parent` `p` -BeforeExecute --- MySql.5.7 MySql.5.7.MySql.Data MySql57 - -SELECT - `t`.`ID` -FROM - `Parent` `p` - INNER JOIN `TempTable` `t` ON `p`.`ParentID` = `t`.`ID` - BeforeExecute -- MySql.5.7 MySql.5.7.MySql.Data MySql57 (asynchronously) diff --git a/MySql.8.0.LinqService/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestLinqService(MySql.8.0.LinqService,MiniProfiler).sql b/MySql.8.0.LinqService/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestLinqService(MySql.8.0.LinqService,MiniProfiler).sql index c7b72b88c4b..905a61e1046 100644 --- a/MySql.8.0.LinqService/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestLinqService(MySql.8.0.LinqService,MiniProfiler).sql +++ b/MySql.8.0.LinqService/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestLinqService(MySql.8.0.LinqService,MiniProfiler).sql @@ -1,6 +1,6 @@ BeforeExecute -- test-linq-service-reader MySql MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT @@ -13,7 +13,7 @@ LIMIT 2 BeforeExecute -- test-linq-service-reader MySql MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT diff --git a/MySql.8.0.LinqService/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestLinqService(MySql.8.0.LinqService,MiniProfilerNoMappings).sql b/MySql.8.0.LinqService/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestLinqService(MySql.8.0.LinqService,MiniProfilerNoMappings).sql index c7b72b88c4b..905a61e1046 100644 --- a/MySql.8.0.LinqService/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestLinqService(MySql.8.0.LinqService,MiniProfilerNoMappings).sql +++ b/MySql.8.0.LinqService/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestLinqService(MySql.8.0.LinqService,MiniProfilerNoMappings).sql @@ -1,6 +1,6 @@ BeforeExecute -- test-linq-service-reader MySql MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT @@ -13,7 +13,7 @@ LIMIT 2 BeforeExecute -- test-linq-service-reader MySql MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT diff --git a/MySql.8.0.LinqService/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestLinqService(MySql.8.0.LinqService,Raw).sql b/MySql.8.0.LinqService/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestLinqService(MySql.8.0.LinqService,Raw).sql index c7b72b88c4b..905a61e1046 100644 --- a/MySql.8.0.LinqService/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestLinqService(MySql.8.0.LinqService,Raw).sql +++ b/MySql.8.0.LinqService/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestLinqService(MySql.8.0.LinqService,Raw).sql @@ -1,6 +1,6 @@ BeforeExecute -- test-linq-service-reader MySql MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT @@ -13,7 +13,7 @@ LIMIT 2 BeforeExecute -- test-linq-service-reader MySql MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT diff --git a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.AddDays(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.AddDays(MySql.8.0.LinqService).sql index 09086a5815c..fbf5448819a 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.AddDays(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.AddDays(MySql.8.0.LinqService).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 1 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-29' INSERT INTO `Transactions` @@ -36,7 +36,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 2 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-02-28' INSERT INTO `Transactions` @@ -54,7 +54,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 3 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-02-28' INSERT INTO `Transactions` @@ -72,7 +72,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 4 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-29' INSERT INTO `Transactions` @@ -90,7 +90,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 5 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-01-29' INSERT INTO `Transactions` @@ -108,7 +108,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 6 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-01' INSERT INTO `Transactions` @@ -126,7 +126,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 7 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-28' INSERT INTO `Transactions` @@ -144,7 +144,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 8 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-09' INSERT INTO `Transactions` @@ -162,7 +162,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 9 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-08-09' INSERT INTO `Transactions` @@ -180,7 +180,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 10 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-08-09' INSERT INTO `Transactions` @@ -198,7 +198,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 11 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-09-09' INSERT INTO `Transactions` @@ -216,7 +216,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 12 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-07-09' INSERT INTO `Transactions` @@ -234,7 +234,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 13 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-10' INSERT INTO `Transactions` @@ -252,7 +252,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 14 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-08' INSERT INTO `Transactions` diff --git a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.AddMonths(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.AddMonths(MySql.8.0.LinqService).sql index 2f191bc3a3c..e7c9bc3590b 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.AddMonths(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.AddMonths(MySql.8.0.LinqService).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 1 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-29' INSERT INTO `Transactions` @@ -36,7 +36,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 2 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-02-28' INSERT INTO `Transactions` @@ -54,7 +54,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 3 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-02-28' INSERT INTO `Transactions` @@ -72,7 +72,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 4 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-29' INSERT INTO `Transactions` @@ -90,7 +90,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 5 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-01-29' INSERT INTO `Transactions` @@ -108,7 +108,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 6 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-01' INSERT INTO `Transactions` @@ -126,7 +126,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 7 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-28' INSERT INTO `Transactions` @@ -144,7 +144,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 8 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-09' INSERT INTO `Transactions` @@ -162,7 +162,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 9 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-08-09' INSERT INTO `Transactions` @@ -180,7 +180,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 10 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-08-09' INSERT INTO `Transactions` @@ -198,7 +198,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 11 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-09-09' INSERT INTO `Transactions` @@ -216,7 +216,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 12 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-07-09' INSERT INTO `Transactions` @@ -234,7 +234,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 13 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-10' INSERT INTO `Transactions` @@ -252,7 +252,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 14 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-08' INSERT INTO `Transactions` diff --git a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.AddYears(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.AddYears(MySql.8.0.LinqService).sql index c8c3e16f191..ad4fbd17cdd 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.AddYears(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.AddYears(MySql.8.0.LinqService).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 1 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-29' INSERT INTO `Transactions` @@ -36,7 +36,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 2 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-02-28' INSERT INTO `Transactions` @@ -54,7 +54,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 3 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-02-28' INSERT INTO `Transactions` @@ -72,7 +72,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 4 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-29' INSERT INTO `Transactions` @@ -90,7 +90,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 5 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-01-29' INSERT INTO `Transactions` @@ -108,7 +108,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 6 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-01' INSERT INTO `Transactions` @@ -126,7 +126,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 7 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-28' INSERT INTO `Transactions` @@ -144,7 +144,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 8 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-09' INSERT INTO `Transactions` @@ -162,7 +162,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 9 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-08-09' INSERT INTO `Transactions` @@ -180,7 +180,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 10 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-08-09' INSERT INTO `Transactions` @@ -198,7 +198,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 11 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-09-09' INSERT INTO `Transactions` @@ -216,7 +216,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 12 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-07-09' INSERT INTO `Transactions` @@ -234,7 +234,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 13 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-10' INSERT INTO `Transactions` @@ -252,7 +252,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 14 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-08' INSERT INTO `Transactions` diff --git a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddDay(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddDay(MySql.8.0.LinqService).sql index 09086a5815c..fbf5448819a 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddDay(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddDay(MySql.8.0.LinqService).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 1 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-29' INSERT INTO `Transactions` @@ -36,7 +36,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 2 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-02-28' INSERT INTO `Transactions` @@ -54,7 +54,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 3 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-02-28' INSERT INTO `Transactions` @@ -72,7 +72,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 4 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-29' INSERT INTO `Transactions` @@ -90,7 +90,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 5 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-01-29' INSERT INTO `Transactions` @@ -108,7 +108,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 6 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-01' INSERT INTO `Transactions` @@ -126,7 +126,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 7 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-28' INSERT INTO `Transactions` @@ -144,7 +144,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 8 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-09' INSERT INTO `Transactions` @@ -162,7 +162,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 9 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-08-09' INSERT INTO `Transactions` @@ -180,7 +180,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 10 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-08-09' INSERT INTO `Transactions` @@ -198,7 +198,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 11 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-09-09' INSERT INTO `Transactions` @@ -216,7 +216,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 12 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-07-09' INSERT INTO `Transactions` @@ -234,7 +234,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 13 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-10' INSERT INTO `Transactions` @@ -252,7 +252,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 14 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-08' INSERT INTO `Transactions` diff --git a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddDayOfYear(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddDayOfYear(MySql.8.0.LinqService).sql index 67a4f7e9915..e8648543f87 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddDayOfYear(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddDayOfYear(MySql.8.0.LinqService).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 1 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-29' INSERT INTO `Transactions` @@ -36,7 +36,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 2 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-02-28' INSERT INTO `Transactions` @@ -54,7 +54,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 3 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-02-28' INSERT INTO `Transactions` @@ -72,7 +72,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 4 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-29' INSERT INTO `Transactions` @@ -90,7 +90,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 5 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-01-29' INSERT INTO `Transactions` @@ -108,7 +108,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 6 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-01' INSERT INTO `Transactions` @@ -126,7 +126,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 7 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-28' INSERT INTO `Transactions` @@ -144,7 +144,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 8 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-09' INSERT INTO `Transactions` @@ -162,7 +162,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 9 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-08-09' INSERT INTO `Transactions` @@ -180,7 +180,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 10 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-08-09' INSERT INTO `Transactions` @@ -198,7 +198,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 11 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-09-09' INSERT INTO `Transactions` @@ -216,7 +216,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 12 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-07-09' INSERT INTO `Transactions` @@ -234,7 +234,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 13 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-10' INSERT INTO `Transactions` @@ -252,7 +252,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 14 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-08' INSERT INTO `Transactions` diff --git a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddMonth(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddMonth(MySql.8.0.LinqService).sql index 248133b4972..55c1ec8d33f 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddMonth(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddMonth(MySql.8.0.LinqService).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 1 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-29' INSERT INTO `Transactions` @@ -36,7 +36,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 2 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-02-28' INSERT INTO `Transactions` @@ -54,7 +54,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 3 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-02-28' INSERT INTO `Transactions` @@ -72,7 +72,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 4 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-29' INSERT INTO `Transactions` @@ -90,7 +90,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 5 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-01-29' INSERT INTO `Transactions` @@ -108,7 +108,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 6 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-01' INSERT INTO `Transactions` @@ -126,7 +126,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 7 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-28' INSERT INTO `Transactions` @@ -144,7 +144,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 8 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-09' INSERT INTO `Transactions` @@ -162,7 +162,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 9 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-08-09' INSERT INTO `Transactions` @@ -180,7 +180,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 10 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-08-09' INSERT INTO `Transactions` @@ -198,7 +198,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 11 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-09-09' INSERT INTO `Transactions` @@ -216,7 +216,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 12 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-07-09' INSERT INTO `Transactions` @@ -234,7 +234,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 13 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-10' INSERT INTO `Transactions` @@ -252,7 +252,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 14 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-08' INSERT INTO `Transactions` diff --git a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddQuarter(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddQuarter(MySql.8.0.LinqService).sql index c0454b7be08..825b70152d6 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddQuarter(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddQuarter(MySql.8.0.LinqService).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 1 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-29' INSERT INTO `Transactions` @@ -36,7 +36,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 2 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-02-28' INSERT INTO `Transactions` @@ -54,7 +54,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 3 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-02-28' INSERT INTO `Transactions` @@ -72,7 +72,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 4 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-29' INSERT INTO `Transactions` @@ -90,7 +90,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 5 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-01-29' INSERT INTO `Transactions` @@ -108,7 +108,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 6 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-01' INSERT INTO `Transactions` @@ -126,7 +126,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 7 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-28' INSERT INTO `Transactions` @@ -144,7 +144,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 8 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-09' INSERT INTO `Transactions` @@ -162,7 +162,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 9 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-08-09' INSERT INTO `Transactions` @@ -180,7 +180,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 10 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-08-09' INSERT INTO `Transactions` @@ -198,7 +198,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 11 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-09-09' INSERT INTO `Transactions` @@ -216,7 +216,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 12 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-07-09' INSERT INTO `Transactions` @@ -234,7 +234,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 13 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-10' INSERT INTO `Transactions` @@ -252,7 +252,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 14 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-08' INSERT INTO `Transactions` diff --git a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddWeek(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddWeek(MySql.8.0.LinqService).sql index 0433f282d64..6d90e3216f9 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddWeek(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddWeek(MySql.8.0.LinqService).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 1 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-29' INSERT INTO `Transactions` @@ -36,7 +36,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 2 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-02-28' INSERT INTO `Transactions` @@ -54,7 +54,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 3 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-02-28' INSERT INTO `Transactions` @@ -72,7 +72,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 4 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-29' INSERT INTO `Transactions` @@ -90,7 +90,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 5 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-01-29' INSERT INTO `Transactions` @@ -108,7 +108,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 6 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-01' INSERT INTO `Transactions` @@ -126,7 +126,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 7 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-28' INSERT INTO `Transactions` @@ -144,7 +144,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 8 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-09' INSERT INTO `Transactions` @@ -162,7 +162,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 9 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-08-09' INSERT INTO `Transactions` @@ -180,7 +180,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 10 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-08-09' INSERT INTO `Transactions` @@ -198,7 +198,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 11 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-09-09' INSERT INTO `Transactions` @@ -216,7 +216,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 12 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-07-09' INSERT INTO `Transactions` @@ -234,7 +234,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 13 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-10' INSERT INTO `Transactions` @@ -252,7 +252,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 14 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-08' INSERT INTO `Transactions` diff --git a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddWeekDay(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddWeekDay(MySql.8.0.LinqService).sql index b88698c2e95..01104653681 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddWeekDay(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddWeekDay(MySql.8.0.LinqService).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 1 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-29' INSERT INTO `Transactions` @@ -36,7 +36,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 2 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-02-28' INSERT INTO `Transactions` @@ -54,7 +54,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 3 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-02-28' INSERT INTO `Transactions` @@ -72,7 +72,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 4 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-29' INSERT INTO `Transactions` @@ -90,7 +90,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 5 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-01-29' INSERT INTO `Transactions` @@ -108,7 +108,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 6 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-01' INSERT INTO `Transactions` @@ -126,7 +126,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 7 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-28' INSERT INTO `Transactions` @@ -144,7 +144,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 8 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-09' INSERT INTO `Transactions` @@ -162,7 +162,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 9 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-08-09' INSERT INTO `Transactions` @@ -180,7 +180,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 10 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-08-09' INSERT INTO `Transactions` @@ -198,7 +198,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 11 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-09-09' INSERT INTO `Transactions` @@ -216,7 +216,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 12 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-07-09' INSERT INTO `Transactions` @@ -234,7 +234,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 13 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-10' INSERT INTO `Transactions` @@ -252,7 +252,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 14 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-08' INSERT INTO `Transactions` diff --git a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddYear(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddYear(MySql.8.0.LinqService).sql index c8c3e16f191..ad4fbd17cdd 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddYear(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DateAddYear(MySql.8.0.LinqService).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 1 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-29' INSERT INTO `Transactions` @@ -36,7 +36,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 2 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-02-28' INSERT INTO `Transactions` @@ -54,7 +54,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 3 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-02-28' INSERT INTO `Transactions` @@ -72,7 +72,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 4 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-29' INSERT INTO `Transactions` @@ -90,7 +90,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 5 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-01-29' INSERT INTO `Transactions` @@ -108,7 +108,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 6 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-01' INSERT INTO `Transactions` @@ -126,7 +126,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 7 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-28' INSERT INTO `Transactions` @@ -144,7 +144,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 8 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-09' INSERT INTO `Transactions` @@ -162,7 +162,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 9 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-08-09' INSERT INTO `Transactions` @@ -180,7 +180,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 10 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-08-09' INSERT INTO `Transactions` @@ -198,7 +198,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 11 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-09-09' INSERT INTO `Transactions` @@ -216,7 +216,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 12 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-07-09' INSERT INTO `Transactions` @@ -234,7 +234,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 13 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-10' INSERT INTO `Transactions` @@ -252,7 +252,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 14 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-08' INSERT INTO `Transactions` diff --git a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartDay(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartDay(MySql.8.0.LinqService).sql index fc0376c9025..6328b69a043 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartDay(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartDay(MySql.8.0.LinqService).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 1 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-29' INSERT INTO `Transactions` @@ -36,7 +36,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 2 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-02-28' INSERT INTO `Transactions` @@ -54,7 +54,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 3 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-02-28' INSERT INTO `Transactions` @@ -72,7 +72,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 4 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-29' INSERT INTO `Transactions` @@ -90,7 +90,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 5 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-01-29' INSERT INTO `Transactions` @@ -108,7 +108,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 6 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-01' INSERT INTO `Transactions` @@ -126,7 +126,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 7 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-28' INSERT INTO `Transactions` @@ -144,7 +144,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 8 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-09' INSERT INTO `Transactions` @@ -162,7 +162,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 9 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-08-09' INSERT INTO `Transactions` @@ -180,7 +180,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 10 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-08-09' INSERT INTO `Transactions` @@ -198,7 +198,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 11 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-09-09' INSERT INTO `Transactions` @@ -216,7 +216,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 12 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-07-09' INSERT INTO `Transactions` @@ -234,7 +234,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 13 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-10' INSERT INTO `Transactions` @@ -252,7 +252,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 14 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-08' INSERT INTO `Transactions` diff --git a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartDayOfYear(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartDayOfYear(MySql.8.0.LinqService).sql index 76dd8098555..187625dba2d 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartDayOfYear(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartDayOfYear(MySql.8.0.LinqService).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 1 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-29' INSERT INTO `Transactions` @@ -36,7 +36,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 2 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-02-28' INSERT INTO `Transactions` @@ -54,7 +54,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 3 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-02-28' INSERT INTO `Transactions` @@ -72,7 +72,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 4 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-29' INSERT INTO `Transactions` @@ -90,7 +90,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 5 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-01-29' INSERT INTO `Transactions` @@ -108,7 +108,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 6 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-01' INSERT INTO `Transactions` @@ -126,7 +126,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 7 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-28' INSERT INTO `Transactions` @@ -144,7 +144,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 8 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-09' INSERT INTO `Transactions` @@ -162,7 +162,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 9 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-08-09' INSERT INTO `Transactions` @@ -180,7 +180,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 10 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-08-09' INSERT INTO `Transactions` @@ -198,7 +198,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 11 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-09-09' INSERT INTO `Transactions` @@ -216,7 +216,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 12 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-07-09' INSERT INTO `Transactions` @@ -234,7 +234,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 13 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-10' INSERT INTO `Transactions` @@ -252,7 +252,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 14 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-08' INSERT INTO `Transactions` diff --git a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartMonth(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartMonth(MySql.8.0.LinqService).sql index d5c790315ba..6b544de02c4 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartMonth(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartMonth(MySql.8.0.LinqService).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 1 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-29' INSERT INTO `Transactions` @@ -36,7 +36,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 2 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-02-28' INSERT INTO `Transactions` @@ -54,7 +54,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 3 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-02-28' INSERT INTO `Transactions` @@ -72,7 +72,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 4 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-29' INSERT INTO `Transactions` @@ -90,7 +90,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 5 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-01-29' INSERT INTO `Transactions` @@ -108,7 +108,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 6 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-01' INSERT INTO `Transactions` @@ -126,7 +126,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 7 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-28' INSERT INTO `Transactions` @@ -144,7 +144,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 8 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-09' INSERT INTO `Transactions` @@ -162,7 +162,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 9 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-08-09' INSERT INTO `Transactions` @@ -180,7 +180,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 10 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-08-09' INSERT INTO `Transactions` @@ -198,7 +198,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 11 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-09-09' INSERT INTO `Transactions` @@ -216,7 +216,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 12 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-07-09' INSERT INTO `Transactions` @@ -234,7 +234,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 13 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-10' INSERT INTO `Transactions` @@ -252,7 +252,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 14 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-08' INSERT INTO `Transactions` diff --git a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartQuarter(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartQuarter(MySql.8.0.LinqService).sql index 9138dae2bcc..1e01d7a09f1 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartQuarter(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartQuarter(MySql.8.0.LinqService).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 1 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-29' INSERT INTO `Transactions` @@ -36,7 +36,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 2 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-02-28' INSERT INTO `Transactions` @@ -54,7 +54,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 3 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-02-28' INSERT INTO `Transactions` @@ -72,7 +72,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 4 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-29' INSERT INTO `Transactions` @@ -90,7 +90,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 5 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-01-29' INSERT INTO `Transactions` @@ -108,7 +108,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 6 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-01' INSERT INTO `Transactions` @@ -126,7 +126,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 7 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-28' INSERT INTO `Transactions` @@ -144,7 +144,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 8 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-09' INSERT INTO `Transactions` @@ -162,7 +162,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 9 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-08-09' INSERT INTO `Transactions` @@ -180,7 +180,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 10 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-08-09' INSERT INTO `Transactions` @@ -198,7 +198,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 11 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-09-09' INSERT INTO `Transactions` @@ -216,7 +216,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 12 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-07-09' INSERT INTO `Transactions` @@ -234,7 +234,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 13 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-10' INSERT INTO `Transactions` @@ -252,7 +252,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 14 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-08' INSERT INTO `Transactions` diff --git a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartWeek(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartWeek(MySql.8.0.LinqService).sql index 8913eb8ee04..e8c61a1b062 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartWeek(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartWeek(MySql.8.0.LinqService).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 1 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-29' INSERT INTO `Transactions` @@ -36,7 +36,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 2 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-02-28' INSERT INTO `Transactions` @@ -54,7 +54,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 3 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-02-28' INSERT INTO `Transactions` @@ -72,7 +72,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 4 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-29' INSERT INTO `Transactions` @@ -90,7 +90,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 5 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-01-29' INSERT INTO `Transactions` @@ -108,7 +108,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 6 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-01' INSERT INTO `Transactions` @@ -126,7 +126,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 7 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-28' INSERT INTO `Transactions` @@ -144,7 +144,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 8 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-09' INSERT INTO `Transactions` @@ -162,7 +162,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 9 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-08-09' INSERT INTO `Transactions` @@ -180,7 +180,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 10 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-08-09' INSERT INTO `Transactions` @@ -198,7 +198,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 11 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-09-09' INSERT INTO `Transactions` @@ -216,7 +216,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 12 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-07-09' INSERT INTO `Transactions` @@ -234,7 +234,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 13 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-10' INSERT INTO `Transactions` @@ -252,7 +252,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 14 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-08' INSERT INTO `Transactions` diff --git a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartWeekDay(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartWeekDay(MySql.8.0.LinqService).sql index 8b92c44917a..23837153b96 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartWeekDay(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartWeekDay(MySql.8.0.LinqService).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 1 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-29' INSERT INTO `Transactions` @@ -36,7 +36,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 2 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-02-28' INSERT INTO `Transactions` @@ -54,7 +54,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 3 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-02-28' INSERT INTO `Transactions` @@ -72,7 +72,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 4 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-29' INSERT INTO `Transactions` @@ -90,7 +90,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 5 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-01-29' INSERT INTO `Transactions` @@ -108,7 +108,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 6 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-01' INSERT INTO `Transactions` @@ -126,7 +126,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 7 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-28' INSERT INTO `Transactions` @@ -144,7 +144,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 8 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-09' INSERT INTO `Transactions` @@ -162,7 +162,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 9 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-08-09' INSERT INTO `Transactions` @@ -180,7 +180,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 10 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-08-09' INSERT INTO `Transactions` @@ -198,7 +198,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 11 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-09-09' INSERT INTO `Transactions` @@ -216,7 +216,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 12 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-07-09' INSERT INTO `Transactions` @@ -234,7 +234,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 13 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-10' INSERT INTO `Transactions` @@ -252,7 +252,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 14 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-08' INSERT INTO `Transactions` diff --git a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartYear(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartYear(MySql.8.0.LinqService).sql index 1c46b742341..ba44ae40e94 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartYear(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatePartYear(MySql.8.0.LinqService).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 1 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-29' INSERT INTO `Transactions` @@ -36,7 +36,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 2 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-02-28' INSERT INTO `Transactions` @@ -54,7 +54,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 3 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-02-28' INSERT INTO `Transactions` @@ -72,7 +72,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 4 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-29' INSERT INTO `Transactions` @@ -90,7 +90,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 5 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-01-29' INSERT INTO `Transactions` @@ -108,7 +108,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 6 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-01' INSERT INTO `Transactions` @@ -126,7 +126,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 7 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-28' INSERT INTO `Transactions` @@ -144,7 +144,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 8 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-09' INSERT INTO `Transactions` @@ -162,7 +162,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 9 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-08-09' INSERT INTO `Transactions` @@ -180,7 +180,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 10 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-08-09' INSERT INTO `Transactions` @@ -198,7 +198,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 11 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-09-09' INSERT INTO `Transactions` @@ -216,7 +216,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 12 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-07-09' INSERT INTO `Transactions` @@ -234,7 +234,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 13 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-10' INSERT INTO `Transactions` @@ -252,7 +252,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 14 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-08' INSERT INTO `Transactions` diff --git a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatepartDynamic(MySql.8.0.LinqService,Day).sql b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatepartDynamic(MySql.8.0.LinqService,Day).sql index fc0376c9025..6328b69a043 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatepartDynamic(MySql.8.0.LinqService,Day).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatepartDynamic(MySql.8.0.LinqService,Day).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 1 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-29' INSERT INTO `Transactions` @@ -36,7 +36,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 2 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-02-28' INSERT INTO `Transactions` @@ -54,7 +54,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 3 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-02-28' INSERT INTO `Transactions` @@ -72,7 +72,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 4 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-29' INSERT INTO `Transactions` @@ -90,7 +90,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 5 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-01-29' INSERT INTO `Transactions` @@ -108,7 +108,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 6 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-01' INSERT INTO `Transactions` @@ -126,7 +126,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 7 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-28' INSERT INTO `Transactions` @@ -144,7 +144,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 8 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-09' INSERT INTO `Transactions` @@ -162,7 +162,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 9 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-08-09' INSERT INTO `Transactions` @@ -180,7 +180,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 10 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-08-09' INSERT INTO `Transactions` @@ -198,7 +198,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 11 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-09-09' INSERT INTO `Transactions` @@ -216,7 +216,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 12 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-07-09' INSERT INTO `Transactions` @@ -234,7 +234,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 13 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-10' INSERT INTO `Transactions` @@ -252,7 +252,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 14 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-08' INSERT INTO `Transactions` diff --git a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatepartDynamic(MySql.8.0.LinqService,Month).sql b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatepartDynamic(MySql.8.0.LinqService,Month).sql index d5c790315ba..6b544de02c4 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatepartDynamic(MySql.8.0.LinqService,Month).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatepartDynamic(MySql.8.0.LinqService,Month).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 1 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-29' INSERT INTO `Transactions` @@ -36,7 +36,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 2 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-02-28' INSERT INTO `Transactions` @@ -54,7 +54,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 3 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-02-28' INSERT INTO `Transactions` @@ -72,7 +72,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 4 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-29' INSERT INTO `Transactions` @@ -90,7 +90,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 5 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-01-29' INSERT INTO `Transactions` @@ -108,7 +108,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 6 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-01' INSERT INTO `Transactions` @@ -126,7 +126,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 7 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-28' INSERT INTO `Transactions` @@ -144,7 +144,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 8 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-09' INSERT INTO `Transactions` @@ -162,7 +162,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 9 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-08-09' INSERT INTO `Transactions` @@ -180,7 +180,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 10 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-08-09' INSERT INTO `Transactions` @@ -198,7 +198,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 11 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-09-09' INSERT INTO `Transactions` @@ -216,7 +216,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 12 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-07-09' INSERT INTO `Transactions` @@ -234,7 +234,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 13 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-10' INSERT INTO `Transactions` @@ -252,7 +252,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 14 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-08' INSERT INTO `Transactions` diff --git a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatepartDynamic(MySql.8.0.LinqService,Year).sql b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatepartDynamic(MySql.8.0.LinqService,Year).sql index 1c46b742341..ba44ae40e94 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatepartDynamic(MySql.8.0.LinqService,Year).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DatepartDynamic(MySql.8.0.LinqService,Year).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 1 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-29' INSERT INTO `Transactions` @@ -36,7 +36,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 2 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-02-28' INSERT INTO `Transactions` @@ -54,7 +54,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 3 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-02-28' INSERT INTO `Transactions` @@ -72,7 +72,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 4 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-29' INSERT INTO `Transactions` @@ -90,7 +90,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 5 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-01-29' INSERT INTO `Transactions` @@ -108,7 +108,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 6 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-01' INSERT INTO `Transactions` @@ -126,7 +126,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 7 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-28' INSERT INTO `Transactions` @@ -144,7 +144,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 8 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-09' INSERT INTO `Transactions` @@ -162,7 +162,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 9 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-08-09' INSERT INTO `Transactions` @@ -180,7 +180,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 10 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-08-09' INSERT INTO `Transactions` @@ -198,7 +198,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 11 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-09-09' INSERT INTO `Transactions` @@ -216,7 +216,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 12 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-07-09' INSERT INTO `Transactions` @@ -234,7 +234,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 13 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-10' INSERT INTO `Transactions` @@ -252,7 +252,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 14 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-08' INSERT INTO `Transactions` diff --git a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.Day(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.Day(MySql.8.0.LinqService).sql index fc0376c9025..6328b69a043 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.Day(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.Day(MySql.8.0.LinqService).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 1 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-29' INSERT INTO `Transactions` @@ -36,7 +36,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 2 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-02-28' INSERT INTO `Transactions` @@ -54,7 +54,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 3 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-02-28' INSERT INTO `Transactions` @@ -72,7 +72,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 4 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-29' INSERT INTO `Transactions` @@ -90,7 +90,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 5 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-01-29' INSERT INTO `Transactions` @@ -108,7 +108,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 6 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-01' INSERT INTO `Transactions` @@ -126,7 +126,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 7 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-28' INSERT INTO `Transactions` @@ -144,7 +144,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 8 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-09' INSERT INTO `Transactions` @@ -162,7 +162,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 9 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-08-09' INSERT INTO `Transactions` @@ -180,7 +180,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 10 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-08-09' INSERT INTO `Transactions` @@ -198,7 +198,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 11 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-09-09' INSERT INTO `Transactions` @@ -216,7 +216,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 12 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-07-09' INSERT INTO `Transactions` @@ -234,7 +234,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 13 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-10' INSERT INTO `Transactions` @@ -252,7 +252,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 14 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-08' INSERT INTO `Transactions` diff --git a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DayOfYear(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DayOfYear(MySql.8.0.LinqService).sql index 76dd8098555..187625dba2d 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DayOfYear(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.DayOfYear(MySql.8.0.LinqService).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 1 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-29' INSERT INTO `Transactions` @@ -36,7 +36,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 2 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-02-28' INSERT INTO `Transactions` @@ -54,7 +54,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 3 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-02-28' INSERT INTO `Transactions` @@ -72,7 +72,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 4 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-29' INSERT INTO `Transactions` @@ -90,7 +90,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 5 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-01-29' INSERT INTO `Transactions` @@ -108,7 +108,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 6 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-01' INSERT INTO `Transactions` @@ -126,7 +126,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 7 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-28' INSERT INTO `Transactions` @@ -144,7 +144,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 8 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-09' INSERT INTO `Transactions` @@ -162,7 +162,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 9 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-08-09' INSERT INTO `Transactions` @@ -180,7 +180,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 10 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-08-09' INSERT INTO `Transactions` @@ -198,7 +198,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 11 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-09-09' INSERT INTO `Transactions` @@ -216,7 +216,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 12 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-07-09' INSERT INTO `Transactions` @@ -234,7 +234,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 13 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-10' INSERT INTO `Transactions` @@ -252,7 +252,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 14 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-08' INSERT INTO `Transactions` diff --git a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.Month(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.Month(MySql.8.0.LinqService).sql index d5c790315ba..6b544de02c4 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.Month(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.Month(MySql.8.0.LinqService).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 1 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-29' INSERT INTO `Transactions` @@ -36,7 +36,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 2 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-02-28' INSERT INTO `Transactions` @@ -54,7 +54,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 3 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-02-28' INSERT INTO `Transactions` @@ -72,7 +72,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 4 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-29' INSERT INTO `Transactions` @@ -90,7 +90,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 5 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-01-29' INSERT INTO `Transactions` @@ -108,7 +108,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 6 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-01' INSERT INTO `Transactions` @@ -126,7 +126,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 7 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-28' INSERT INTO `Transactions` @@ -144,7 +144,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 8 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-09' INSERT INTO `Transactions` @@ -162,7 +162,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 9 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-08-09' INSERT INTO `Transactions` @@ -180,7 +180,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 10 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-08-09' INSERT INTO `Transactions` @@ -198,7 +198,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 11 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-09-09' INSERT INTO `Transactions` @@ -216,7 +216,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 12 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-07-09' INSERT INTO `Transactions` @@ -234,7 +234,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 13 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-10' INSERT INTO `Transactions` @@ -252,7 +252,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 14 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-08' INSERT INTO `Transactions` diff --git a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.Parse1(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.Parse1(MySql.8.0.LinqService).sql index e76cd94dbdd..2b42fdf26b5 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.Parse1(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.Parse1(MySql.8.0.LinqService).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 1 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-29' INSERT INTO `Transactions` @@ -36,7 +36,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 2 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-02-28' INSERT INTO `Transactions` @@ -54,7 +54,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 3 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-02-28' INSERT INTO `Transactions` @@ -72,7 +72,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 4 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-29' INSERT INTO `Transactions` @@ -90,7 +90,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 5 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-01-29' INSERT INTO `Transactions` @@ -108,7 +108,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 6 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-01' INSERT INTO `Transactions` @@ -126,7 +126,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 7 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-28' INSERT INTO `Transactions` @@ -144,7 +144,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 8 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-09' INSERT INTO `Transactions` @@ -162,7 +162,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 9 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-08-09' INSERT INTO `Transactions` @@ -180,7 +180,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 10 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-08-09' INSERT INTO `Transactions` @@ -198,7 +198,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 11 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-09-09' INSERT INTO `Transactions` @@ -216,7 +216,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 12 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-07-09' INSERT INTO `Transactions` @@ -234,7 +234,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 13 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-10' INSERT INTO `Transactions` @@ -252,7 +252,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 14 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-08' INSERT INTO `Transactions` diff --git a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.Parse2(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.Parse2(MySql.8.0.LinqService).sql index a622dad47ec..9a2c7fd2776 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.Parse2(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.Parse2(MySql.8.0.LinqService).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 1 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-29' INSERT INTO `Transactions` @@ -36,7 +36,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 2 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-02-28' INSERT INTO `Transactions` @@ -54,7 +54,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 3 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-02-28' INSERT INTO `Transactions` @@ -72,7 +72,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 4 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-29' INSERT INTO `Transactions` @@ -90,7 +90,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 5 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-01-29' INSERT INTO `Transactions` @@ -108,7 +108,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 6 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-01' INSERT INTO `Transactions` @@ -126,7 +126,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 7 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-28' INSERT INTO `Transactions` @@ -144,7 +144,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 8 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-09' INSERT INTO `Transactions` @@ -162,7 +162,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 9 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-08-09' INSERT INTO `Transactions` @@ -180,7 +180,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 10 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-08-09' INSERT INTO `Transactions` @@ -198,7 +198,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 11 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-09-09' INSERT INTO `Transactions` @@ -216,7 +216,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 12 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-07-09' INSERT INTO `Transactions` @@ -234,7 +234,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 13 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-10' INSERT INTO `Transactions` @@ -252,7 +252,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 14 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-08' INSERT INTO `Transactions` diff --git a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.Year(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.Year(MySql.8.0.LinqService).sql index 1c46b742341..ba44ae40e94 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.Year(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateOnlyFunctionTests/Tests.Linq.DateOnlyFunctionTests.Year(MySql.8.0.LinqService).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 1 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-29' INSERT INTO `Transactions` @@ -36,7 +36,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 2 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-02-28' INSERT INTO `Transactions` @@ -54,7 +54,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 3 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-02-28' INSERT INTO `Transactions` @@ -72,7 +72,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 4 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-29' INSERT INTO `Transactions` @@ -90,7 +90,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 5 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-01-29' INSERT INTO `Transactions` @@ -108,7 +108,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 6 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-03-01' INSERT INTO `Transactions` @@ -126,7 +126,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 7 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-02-28' INSERT INTO `Transactions` @@ -144,7 +144,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 8 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-09' INSERT INTO `Transactions` @@ -162,7 +162,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 9 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2021-08-09' INSERT INTO `Transactions` @@ -180,7 +180,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 10 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2019-08-09' INSERT INTO `Transactions` @@ -198,7 +198,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 11 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-09-09' INSERT INTO `Transactions` @@ -216,7 +216,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 12 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-07-09' INSERT INTO `Transactions` @@ -234,7 +234,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 13 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-10' INSERT INTO `Transactions` @@ -252,7 +252,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @TransactionId Int32 SET @TransactionId = 14 -DECLARE @TransactionDate Datetime -- DateTime +DECLARE @TransactionDate DateTime SET @TransactionDate = '2020-08-08' INSERT INTO `Transactions` diff --git a/MySql.8.0.LinqService/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnNegative(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnNegative(MySql.8.0.LinqService).sql index b0b4404d949..da14af999c6 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnNegative(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnNegative(MySql.8.0.LinqService).sql @@ -4,7 +4,7 @@ DECLARE @ID Int32 SET @ID = 5000 DECLARE @MoneyValue Decimal(1, 0) SET @MoneyValue = 0 -DECLARE @DateTimeValue Datetime -- DateTime +DECLARE @DateTimeValue DateTime SET @DateTimeValue = '2018-01-03' DECLARE @BoolValue UByte -- Boolean SET @BoolValue = 0 diff --git a/MySql.8.0.LinqService/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnNegativeExpression(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnNegativeExpression(MySql.8.0.LinqService).sql index f078761ee66..776dec06d4a 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnNegativeExpression(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnNegativeExpression(MySql.8.0.LinqService).sql @@ -4,7 +4,7 @@ DECLARE @ID Int32 SET @ID = 5000 DECLARE @MoneyValue Decimal(1, 0) SET @MoneyValue = 0 -DECLARE @DateTimeValue Datetime -- DateTime +DECLARE @DateTimeValue DateTime SET @DateTimeValue = '2018-01-03' DECLARE @BoolValue UByte -- Boolean SET @BoolValue = 0 diff --git a/MySql.8.0.LinqService/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnPositive(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnPositive(MySql.8.0.LinqService).sql index ff61a9ce732..cfa1fe14816 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnPositive(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnPositive(MySql.8.0.LinqService).sql @@ -4,7 +4,7 @@ DECLARE @ID Int32 SET @ID = 5000 DECLARE @MoneyValue Decimal(1, 0) SET @MoneyValue = 0 -DECLARE @DateTimeValue Datetime -- DateTime +DECLARE @DateTimeValue DateTime SET @DateTimeValue = '2018-01-03' DECLARE @BoolValue UByte -- Boolean SET @BoolValue = 0 diff --git a/MySql.8.0.LinqService/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnPositiveExpression(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnPositiveExpression(MySql.8.0.LinqService).sql index a101c98accd..9e4d6d7820b 100644 --- a/MySql.8.0.LinqService/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnPositiveExpression(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnPositiveExpression(MySql.8.0.LinqService).sql @@ -4,7 +4,7 @@ DECLARE @ID Int32 SET @ID = 5000 DECLARE @MoneyValue Decimal(1, 0) SET @MoneyValue = 0 -DECLARE @DateTimeValue Datetime -- DateTime +DECLARE @DateTimeValue DateTime SET @DateTimeValue = '2018-01-03' DECLARE @BoolValue UByte -- Boolean SET @BoolValue = 0 diff --git a/MySql.8.0.LinqService/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Issue3761Test1(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Issue3761Test1(MySql.8.0.LinqService).sql index f22145744b7..b51413d4cfa 100644 --- a/MySql.8.0.LinqService/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Issue3761Test1(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Issue3761Test1(MySql.8.0.LinqService).sql @@ -18,7 +18,7 @@ CREATE TABLE IF NOT EXISTS `Issue3761Table` BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @DATUM Datetime -- DateTime +DECLARE @DATUM DateTime SET @DATUM = '2019-01-01' SELECT diff --git a/MySql.8.0.LinqService/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Issue3761Test2(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Issue3761Test2(MySql.8.0.LinqService).sql index a059bf29348..add32d69692 100644 --- a/MySql.8.0.LinqService/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Issue3761Test2(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Issue3761Test2(MySql.8.0.LinqService).sql @@ -18,7 +18,7 @@ CREATE TABLE IF NOT EXISTS `Issue3761Table` BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @DATUM Datetime -- DateTime +DECLARE @DATUM DateTime SET @DATUM = '2019-01-01' SELECT diff --git a/MySql.8.0.LinqService/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Max4(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Max4(MySql.8.0.LinqService).sql index ae0edcff21c..b93a225cdec 100644 --- a/MySql.8.0.LinqService/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Max4(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Max4(MySql.8.0.LinqService).sql @@ -1,6 +1,6 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = '2020-02-29' SELECT diff --git a/MySql.8.0.LinqService/Tests/Linq/IssueTests/Tests.Linq.IssueTests.Issue42Test(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/IssueTests/Tests.Linq.IssueTests.Issue42Test(MySql.8.0.LinqService).sql index 46b11940a2a..45104bf9b23 100644 --- a/MySql.8.0.LinqService/Tests/Linq/IssueTests/Tests.Linq.IssueTests.Issue42Test(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/IssueTests/Tests.Linq.IssueTests.Issue42Test(MySql.8.0.LinqService).sql @@ -42,9 +42,9 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @MoneyValue Decimal(5, 4) SET @MoneyValue = 1.1100 -DECLARE @DateTimeValue Datetime -- DateTime +DECLARE @DateTimeValue DateTime SET @DateTimeValue = '2001-01-11 01:11:21.100' -DECLARE @DateTimeValue2 Datetime -- DateTime +DECLARE @DateTimeValue2 DateTime SET @DateTimeValue2 = NULL DECLARE @BoolValue UByte -- Boolean SET @BoolValue = 0 @@ -102,9 +102,9 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @MoneyValue Decimal(5, 4) SET @MoneyValue = 1.1100 -DECLARE @DateTimeValue Datetime -- DateTime +DECLARE @DateTimeValue DateTime SET @DateTimeValue = '2001-01-11 01:11:21.100' -DECLARE @DateTimeValue2 Datetime -- DateTime +DECLARE @DateTimeValue2 DateTime SET @DateTimeValue2 = NULL DECLARE @BoolValue UByte -- Boolean SET @BoolValue = 1 diff --git a/MySql.8.0.LinqService/Tests/Linq/ParameterTests/Tests.Linq.ParameterTests.Issue1189Test(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/ParameterTests/Tests.Linq.ParameterTests.Issue1189Test(MySql.8.0.LinqService).sql index 7d6d7c95f5a..25e0f3a8252 100644 --- a/MySql.8.0.LinqService/Tests/Linq/ParameterTests/Tests.Linq.ParameterTests.Issue1189Test(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/ParameterTests/Tests.Linq.ParameterTests.Issue1189Test(MySql.8.0.LinqService).sql @@ -16,7 +16,7 @@ CREATE TABLE IF NOT EXISTS `Issue1189Customer` BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = '2020-02-29 17:54:55.123' SELECT diff --git a/MySql.8.0.LinqService/Tests/Linq/SelectTests/Tests.Linq.SelectTests.SelectNullableTest1(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/SelectTests/Tests.Linq.SelectTests.SelectNullableTest1(MySql.8.0.LinqService).sql index 6d84aa11143..f663ef0a609 100644 --- a/MySql.8.0.LinqService/Tests/Linq/SelectTests/Tests.Linq.SelectTests.SelectNullableTest1(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/SelectTests/Tests.Linq.SelectTests.SelectNullableTest1(MySql.8.0.LinqService).sql @@ -4,9 +4,9 @@ DECLARE @ID Int32 SET @ID = 1000 DECLARE @MoneyValue Decimal(1, 0) SET @MoneyValue = 0 -DECLARE @DateTimeValue Datetime -- DateTime +DECLARE @DateTimeValue DateTime SET @DateTimeValue = NULL -DECLARE @DateTimeValue2 Datetime -- DateTime +DECLARE @DateTimeValue2 DateTime SET @DateTimeValue2 = NULL DECLARE @BoolValue UByte -- Boolean SET @BoolValue = 0 diff --git a/MySql.8.0.LinqService/Tests/Linq/SelectTests/Tests.Linq.SelectTests.SelectNullableTest2(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/SelectTests/Tests.Linq.SelectTests.SelectNullableTest2(MySql.8.0.LinqService).sql index e3a2dec7cf3..2e2d559f9ba 100644 --- a/MySql.8.0.LinqService/Tests/Linq/SelectTests/Tests.Linq.SelectTests.SelectNullableTest2(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/SelectTests/Tests.Linq.SelectTests.SelectNullableTest2(MySql.8.0.LinqService).sql @@ -4,9 +4,9 @@ DECLARE @ID Int32 SET @ID = 1000 DECLARE @MoneyValue Decimal(1, 0) SET @MoneyValue = 0 -DECLARE @DateTimeValue Datetime -- DateTime +DECLARE @DateTimeValue DateTime SET @DateTimeValue = NULL -DECLARE @DateTimeValue2 Datetime -- DateTime +DECLARE @DateTimeValue2 DateTime SET @DateTimeValue2 = NULL DECLARE @BoolValue UByte -- Boolean SET @BoolValue = 0 diff --git a/MySql.8.0.LinqService/Tests/Linq/SqlRowTests/Tests.Linq.SqlRowTests.MixedTypes(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/SqlRowTests/Tests.Linq.SqlRowTests.MixedTypes(MySql.8.0.LinqService).sql index 965ff32642d..ad0f552fa12 100644 --- a/MySql.8.0.LinqService/Tests/Linq/SqlRowTests/Tests.Linq.SqlRowTests.MixedTypes(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/SqlRowTests/Tests.Linq.SqlRowTests.MixedTypes(MySql.8.0.LinqService).sql @@ -21,7 +21,7 @@ DECLARE @Int Int32 SET @Int = 1 DECLARE @Str VarChar(3) -- String SET @Str = 'One' -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = '2001-01-01' DECLARE @Double Double SET @Double = 1 @@ -51,7 +51,7 @@ DECLARE @Int Int32 SET @Int = 2 DECLARE @Str VarChar(3) -- String SET @Str = 'Two' -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = '2002-02-02' DECLARE @Double Double SET @Double = 2 diff --git a/MySql.8.0.LinqService/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTime1(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTime1(MySql.8.0.LinqService).sql index 013665915c6..e1807007e89 100644 --- a/MySql.8.0.LinqService/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTime1(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTime1(MySql.8.0.LinqService).sql @@ -1,6 +1,6 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = '2009-09-20' SELECT diff --git a/MySql.8.0.LinqService/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTime21(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTime21(MySql.8.0.LinqService).sql index 0d7fc720b08..de57a2d062c 100644 --- a/MySql.8.0.LinqService/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTime21(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTime21(MySql.8.0.LinqService).sql @@ -20,7 +20,7 @@ LIMIT 1 BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @dt Datetime -- DateTime +DECLARE @dt DateTime SET @dt = '2010-12-14 05:00:07.425' UPDATE @@ -52,7 +52,7 @@ LIMIT 1 BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @pdt Datetime -- DateTime +DECLARE @pdt DateTime SET @pdt = '2001-01-11 01:11:21.100' UPDATE diff --git a/MySql.8.0.LinqService/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTimeArray1(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTimeArray1(MySql.8.0.LinqService).sql index 191c883990d..7ab24843767 100644 --- a/MySql.8.0.LinqService/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTimeArray1(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTimeArray1(MySql.8.0.LinqService).sql @@ -1,6 +1,6 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @DateTimeValue Datetime -- DateTime +DECLARE @DateTimeValue DateTime SET @DateTimeValue = '2001-01-11 01:11:21.100' SELECT diff --git a/MySql.8.0.LinqService/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTimeParams(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTimeParams(MySql.8.0.LinqService).sql index 4a47825d0b9..7dc41a3a0be 100644 --- a/MySql.8.0.LinqService/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTimeParams(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTimeParams(MySql.8.0.LinqService).sql @@ -1,6 +1,6 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @dateTime Datetime -- DateTime +DECLARE @dateTime DateTime SET @dateTime = '1992-01-11 01:11:21.100' SELECT @@ -13,7 +13,7 @@ LIMIT 1 BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @dateTime Datetime -- DateTime +DECLARE @dateTime DateTime SET @dateTime = '1993-01-11 01:11:21.100' SELECT diff --git a/MySql.8.0.LinqService/Tests/Linq/WhereTests/Tests.Linq.WhereTests.WhereDateTimeTest4(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/Linq/WhereTests/Tests.Linq.WhereTests.WhereDateTimeTest4(MySql.8.0.LinqService).sql index 33e4367a365..d92b38b9b79 100644 --- a/MySql.8.0.LinqService/Tests/Linq/WhereTests/Tests.Linq.WhereTests.WhereDateTimeTest4(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/Linq/WhereTests/Tests.Linq.WhereTests.WhereDateTimeTest4(MySql.8.0.LinqService).sql @@ -1,6 +1,6 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @DateTimeValue Datetime -- DateTime +DECLARE @DateTimeValue DateTime SET @DateTimeValue = '2009-09-27' SELECT diff --git a/MySql.8.0.LinqService/Tests/UserTests/Issue1110Tests/Tests.UserTests.Issue1110Tests.Test(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/UserTests/Issue1110Tests/Tests.UserTests.Issue1110Tests.Test(MySql.8.0.LinqService).sql index 633b50a4610..92ac6afbc9b 100644 --- a/MySql.8.0.LinqService/Tests/UserTests/Issue1110Tests/Tests.UserTests.Issue1110Tests.Test(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/UserTests/Issue1110Tests/Tests.UserTests.Issue1110Tests.Test(MySql.8.0.LinqService).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @Id Int32 SET @Id = 10 -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = '2020-02-29 17:54:55.123' INSERT INTO `Issue1110TB` diff --git a/MySql.8.0.LinqService/Tests/xUpdate/CreateTableTypesTests/Tests.xUpdate.CreateTableTypesTests.TestCreateTableColumnType(MySql.8.0.LinqService,DateTime).sql b/MySql.8.0.LinqService/Tests/xUpdate/CreateTableTypesTests/Tests.xUpdate.CreateTableTypesTests.TestCreateTableColumnType(MySql.8.0.LinqService,DateTime).sql index e33fc131529..5114fb9cd7a 100644 --- a/MySql.8.0.LinqService/Tests/xUpdate/CreateTableTypesTests/Tests.xUpdate.CreateTableTypesTests.TestCreateTableColumnType(MySql.8.0.LinqService,DateTime).sql +++ b/MySql.8.0.LinqService/Tests/xUpdate/CreateTableTypesTests/Tests.xUpdate.CreateTableTypesTests.TestCreateTableColumnType(MySql.8.0.LinqService,DateTime).sql @@ -16,7 +16,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @Id Int32 SET @Id = 1 -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = '2000-01-01' INSERT INTO `CreateTableTypes` @@ -34,7 +34,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @Id Int32 SET @Id = 2 -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = '2018-11-24 01:02:03' INSERT INTO `CreateTableTypes` diff --git a/MySql.8.0.LinqService/Tests/xUpdate/CreateTableTypesTests/Tests.xUpdate.CreateTableTypesTests.TestCreateTableColumnType(MySql.8.0.LinqService,DateTimeNullable).sql b/MySql.8.0.LinqService/Tests/xUpdate/CreateTableTypesTests/Tests.xUpdate.CreateTableTypesTests.TestCreateTableColumnType(MySql.8.0.LinqService,DateTimeNullable).sql index eb62dd40afb..9a17bf8bd54 100644 --- a/MySql.8.0.LinqService/Tests/xUpdate/CreateTableTypesTests/Tests.xUpdate.CreateTableTypesTests.TestCreateTableColumnType(MySql.8.0.LinqService,DateTimeNullable).sql +++ b/MySql.8.0.LinqService/Tests/xUpdate/CreateTableTypesTests/Tests.xUpdate.CreateTableTypesTests.TestCreateTableColumnType(MySql.8.0.LinqService,DateTimeNullable).sql @@ -16,7 +16,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @Id Int32 SET @Id = 1 -DECLARE @DateTimeNullable Datetime -- DateTime +DECLARE @DateTimeNullable DateTime SET @DateTimeNullable = NULL INSERT INTO `CreateTableTypes` @@ -34,7 +34,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @Id Int32 SET @Id = 2 -DECLARE @DateTimeNullable Datetime -- DateTime +DECLARE @DateTimeNullable DateTime SET @DateTimeNullable = '2018-11-25 01:02:03' INSERT INTO `CreateTableTypes` diff --git a/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertArray4(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertArray4(MySql.8.0.LinqService).sql index bd86bd4f5f2..12a5e82d2a1 100644 --- a/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertArray4(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertArray4(MySql.8.0.LinqService).sql @@ -13,7 +13,7 @@ DECLARE @ID Int32 SET @ID = 1001 DECLARE @MoneyValue Decimal(1, 0) SET @MoneyValue = 0 -DECLARE @DateTimeValue Datetime -- DateTime +DECLARE @DateTimeValue DateTime SET @DateTimeValue = NULL DECLARE @BoolValue UByte -- Boolean SET @BoolValue = 1 diff --git a/MySql.8.0.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.TestMergeTypes(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.TestMergeTypes(MySql.8.0.LinqService).sql index 3ab89b1db2b..16d9b5d8904 100644 Binary files a/MySql.8.0.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.TestMergeTypes(MySql.8.0.LinqService).sql and b/MySql.8.0.LinqService/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.TestMergeTypes(MySql.8.0.LinqService).sql differ diff --git a/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateIssue321Regression(MySql.8.0.LinqService).sql b/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateIssue321Regression(MySql.8.0.LinqService).sql index 15749e7ab25..08624f5fef7 100644 --- a/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateIssue321Regression(MySql.8.0.LinqService).sql +++ b/MySql.8.0.LinqService/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateIssue321Regression(MySql.8.0.LinqService).sql @@ -4,9 +4,9 @@ DECLARE @ID Int32 SET @ID = 100500 DECLARE @MoneyValue Decimal(4, 0) SET @MoneyValue = 3000 -DECLARE @DateTimeValue Datetime -- DateTime +DECLARE @DateTimeValue DateTime SET @DateTimeValue = NULL -DECLARE @DateTimeValue2 Datetime -- DateTime +DECLARE @DateTimeValue2 DateTime SET @DateTimeValue2 = NULL DECLARE @BoolValue UByte -- Boolean SET @BoolValue = NULL diff --git a/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestLinqService(MySql.8.0,MiniProfiler).sql b/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestLinqService(MySql.8.0,MiniProfiler).sql index c7b72b88c4b..905a61e1046 100644 --- a/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestLinqService(MySql.8.0,MiniProfiler).sql +++ b/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestLinqService(MySql.8.0,MiniProfiler).sql @@ -1,6 +1,6 @@ BeforeExecute -- test-linq-service-reader MySql MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT @@ -13,7 +13,7 @@ LIMIT 2 BeforeExecute -- test-linq-service-reader MySql MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT diff --git a/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestLinqService(MySql.8.0,MiniProfilerNoMappings).sql b/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestLinqService(MySql.8.0,MiniProfilerNoMappings).sql index c7b72b88c4b..905a61e1046 100644 --- a/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestLinqService(MySql.8.0,MiniProfilerNoMappings).sql +++ b/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestLinqService(MySql.8.0,MiniProfilerNoMappings).sql @@ -1,6 +1,6 @@ BeforeExecute -- test-linq-service-reader MySql MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT @@ -13,7 +13,7 @@ LIMIT 2 BeforeExecute -- test-linq-service-reader MySql MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT diff --git a/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestLinqService(MySql.8.0,Raw).sql b/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestLinqService(MySql.8.0,Raw).sql index c7b72b88c4b..905a61e1046 100644 --- a/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestLinqService(MySql.8.0,Raw).sql +++ b/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestLinqService(MySql.8.0,Raw).sql @@ -1,6 +1,6 @@ BeforeExecute -- test-linq-service-reader MySql MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT @@ -13,7 +13,7 @@ LIMIT 2 BeforeExecute -- test-linq-service-reader MySql MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT diff --git a/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestMapperMap(MySql.8.0,MiniProfiler).sql b/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestMapperMap(MySql.8.0,MiniProfiler).sql index 442b57f6100..6312e49fdba 100644 --- a/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestMapperMap(MySql.8.0,MiniProfiler).sql +++ b/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestMapperMap(MySql.8.0,MiniProfiler).sql @@ -1,6 +1,6 @@ BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT @@ -13,7 +13,7 @@ LIMIT 2 BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT @@ -26,7 +26,7 @@ LIMIT 2 BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT diff --git a/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestMapperMap(MySql.8.0,MiniProfilerNoMappings).sql b/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestMapperMap(MySql.8.0,MiniProfilerNoMappings).sql index 442b57f6100..6312e49fdba 100644 --- a/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestMapperMap(MySql.8.0,MiniProfilerNoMappings).sql +++ b/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestMapperMap(MySql.8.0,MiniProfilerNoMappings).sql @@ -1,6 +1,6 @@ BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT @@ -13,7 +13,7 @@ LIMIT 2 BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT @@ -26,7 +26,7 @@ LIMIT 2 BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT diff --git a/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestMapperMap(MySql.8.0,Raw).sql b/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestMapperMap(MySql.8.0,Raw).sql index 442b57f6100..6312e49fdba 100644 --- a/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestMapperMap(MySql.8.0,Raw).sql +++ b/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestMapperMap(MySql.8.0,Raw).sql @@ -1,6 +1,6 @@ BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT @@ -13,7 +13,7 @@ LIMIT 2 BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT @@ -26,7 +26,7 @@ LIMIT 2 BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT diff --git a/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestMySqlData(MySql.8.0,MiniProfiler).sql b/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestMySqlData(MySql.8.0,MiniProfiler).sql index 6332e29d643..81484139451 100644 --- a/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestMySqlData(MySql.8.0,MiniProfiler).sql +++ b/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestMySqlData(MySql.8.0,MiniProfiler).sql @@ -14,21 +14,21 @@ SELECT Cast(@p as decimal(6, 3)) BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT Cast(@p as datetime) BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT Cast(@p as datetime) BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT @@ -41,7 +41,7 @@ LIMIT 2 BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT @@ -54,7 +54,7 @@ LIMIT 2 BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT @@ -81,21 +81,21 @@ SELECT Cast(@p as decimal(6, 3)) BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = 12/12/2012 12:12:12 SELECT Cast(@p as datetime) BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = 12/12/2012 12:12:12 SELECT Cast(@p as datetime) BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = 12/12/2012 12:12:12 SELECT Cast(@p as datetime) @@ -230,11 +230,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL @@ -335,11 +335,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL diff --git a/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestMySqlData(MySql.8.0,MiniProfilerNoMappings).sql b/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestMySqlData(MySql.8.0,MiniProfilerNoMappings).sql index 7140c596e3b..7054cdbde9d 100644 --- a/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestMySqlData(MySql.8.0,MiniProfilerNoMappings).sql +++ b/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestMySqlData(MySql.8.0,MiniProfilerNoMappings).sql @@ -7,21 +7,21 @@ SELECT Cast(@p as decimal(6, 3)) BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT Cast(@p as datetime) BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT Cast(@p as datetime) BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT @@ -34,7 +34,7 @@ LIMIT 2 BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT @@ -47,7 +47,7 @@ LIMIT 2 BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT @@ -74,21 +74,21 @@ SELECT Cast(@p as decimal(6, 3)) BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = 12/12/2012 12:12:12 SELECT Cast(@p as datetime) BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = 12/12/2012 12:12:12 SELECT Cast(@p as datetime) BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = 12/12/2012 12:12:12 SELECT Cast(@p as datetime) @@ -223,11 +223,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL @@ -328,11 +328,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL diff --git a/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestMySqlData(MySql.8.0,Raw).sql b/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestMySqlData(MySql.8.0,Raw).sql index 6332e29d643..81484139451 100644 --- a/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestMySqlData(MySql.8.0,Raw).sql +++ b/MySql.8.0/Tests/Data/MiniProfilerTests/Tests.Data.MiniProfilerTests.TestMySqlData(MySql.8.0,Raw).sql @@ -14,21 +14,21 @@ SELECT Cast(@p as decimal(6, 3)) BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT Cast(@p as datetime) BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT Cast(@p as datetime) BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT @@ -41,7 +41,7 @@ LIMIT 2 BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT @@ -54,7 +54,7 @@ LIMIT 2 BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT @@ -81,21 +81,21 @@ SELECT Cast(@p as decimal(6, 3)) BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = 12/12/2012 12:12:12 SELECT Cast(@p as datetime) BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = 12/12/2012 12:12:12 SELECT Cast(@p as datetime) BeforeExecute -- MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = 12/12/2012 12:12:12 SELECT Cast(@p as datetime) @@ -230,11 +230,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL @@ -335,11 +335,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL diff --git a/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.FullTextIndexTest(MySql.8.0).sql b/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.FullTextIndexTest(MySql.8.0).sql index 01dff9ff1ae..7d59866e9e2 100644 --- a/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.FullTextIndexTest(MySql.8.0).sql +++ b/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.FullTextIndexTest(MySql.8.0).sql @@ -121,11 +121,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL @@ -226,11 +226,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL diff --git a/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.Issue1993(MySql.8.0).sql b/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.Issue1993(MySql.8.0).sql index 01dff9ff1ae..7d59866e9e2 100644 --- a/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.Issue1993(MySql.8.0).sql +++ b/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.Issue1993(MySql.8.0).sql @@ -121,11 +121,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL @@ -226,11 +226,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL diff --git a/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.ProceduresSchemaProviderTest(MySql.8.0,TestFunction).sql b/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.ProceduresSchemaProviderTest(MySql.8.0,TestFunction).sql index c59f9729ab9..d2ccaa34c16 100644 --- a/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.ProceduresSchemaProviderTest(MySql.8.0,TestFunction).sql +++ b/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.ProceduresSchemaProviderTest(MySql.8.0,TestFunction).sql @@ -130,11 +130,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL @@ -235,11 +235,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL diff --git a/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.ProceduresSchemaProviderTest(MySql.8.0,TestOutputParametersWithoutTableProcedure).sql b/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.ProceduresSchemaProviderTest(MySql.8.0,TestOutputParametersWithoutTableProcedure).sql index c59f9729ab9..d2ccaa34c16 100644 --- a/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.ProceduresSchemaProviderTest(MySql.8.0,TestOutputParametersWithoutTableProcedure).sql +++ b/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.ProceduresSchemaProviderTest(MySql.8.0,TestOutputParametersWithoutTableProcedure).sql @@ -130,11 +130,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL @@ -235,11 +235,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL diff --git a/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.ProceduresSchemaProviderTest(MySql.8.0,TestProcedure).sql b/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.ProceduresSchemaProviderTest(MySql.8.0,TestProcedure).sql index c59f9729ab9..d2ccaa34c16 100644 --- a/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.ProceduresSchemaProviderTest(MySql.8.0,TestProcedure).sql +++ b/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.ProceduresSchemaProviderTest(MySql.8.0,TestProcedure).sql @@ -130,11 +130,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL @@ -235,11 +235,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL diff --git a/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.SchemaProviderTest(MySql.8.0).sql b/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.SchemaProviderTest(MySql.8.0).sql index 01dff9ff1ae..7d59866e9e2 100644 --- a/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.SchemaProviderTest(MySql.8.0).sql +++ b/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.SchemaProviderTest(MySql.8.0).sql @@ -121,11 +121,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL @@ -226,11 +226,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL diff --git a/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.TestCreateTable(MySql.8.0).sql b/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.TestCreateTable(MySql.8.0).sql index 1dfc16c7408..919f17a702d 100644 --- a/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.TestCreateTable(MySql.8.0).sql +++ b/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.TestCreateTable(MySql.8.0).sql @@ -111,11 +111,11 @@ DECLARE @LongText VarChar(4) -- String SET @LongText = '1v23' DECLARE @TextDefault VarChar(5) -- String SET @TextDefault = '12 #3' -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = '2123-02-03' -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = '2123-02-03 11:22:33' -DECLARE @DateTime3 Datetime -- DateTime +DECLARE @DateTime3 DateTime SET @DateTime3 = '2123-02-03 11:22:33.123' DECLARE @Time Time SET @Time = -04:03:53 diff --git a/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.TestDataTypes(MySql.8.0).sql b/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.TestDataTypes(MySql.8.0).sql index e38559c1f72..b6becd5019e 100644 --- a/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.TestDataTypes(MySql.8.0).sql +++ b/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.TestDataTypes(MySql.8.0).sql @@ -473,14 +473,14 @@ SELECT dateDataType FROM `AllTypes` WHERE ID = 1 BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = NULL SELECT ID FROM `AllTypes` WHERE @p IS NULL AND dateDataType IS NULL OR @p IS NOT NULL AND dateDataType = @p BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = NULL SELECT ID FROM `AllTypes` WHERE @p IS NULL AND dateDataType IS NULL OR @p IS NOT NULL AND dateDataType = @p @@ -499,21 +499,21 @@ SELECT dateDataType FROM `AllTypes` WHERE ID = 2 BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12' SELECT ID FROM `AllTypes` WHERE dateDataType = @p BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12' SELECT ID FROM `AllTypes` WHERE dateDataType = @p BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12' SELECT ID FROM `AllTypes` WHERE dateDataType = @p @@ -525,14 +525,14 @@ SELECT datetimeDataType FROM `AllTypes` WHERE ID = 1 BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = NULL SELECT ID FROM `AllTypes` WHERE @p IS NULL AND datetimeDataType IS NULL OR @p IS NOT NULL AND datetimeDataType = @p BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = NULL SELECT ID FROM `AllTypes` WHERE @p IS NULL AND datetimeDataType IS NULL OR @p IS NOT NULL AND datetimeDataType = @p @@ -551,21 +551,21 @@ SELECT datetimeDataType FROM `AllTypes` WHERE ID = 2 BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT ID FROM `AllTypes` WHERE datetimeDataType = @p BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT ID FROM `AllTypes` WHERE datetimeDataType = @p BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT ID FROM `AllTypes` WHERE datetimeDataType = @p @@ -577,14 +577,14 @@ SELECT datetimeDataType FROM `AllTypes` WHERE ID = 1 BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = NULL SELECT ID FROM `AllTypes` WHERE @p IS NULL AND datetimeDataType IS NULL OR @p IS NOT NULL AND datetimeDataType = @p BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = NULL SELECT ID FROM `AllTypes` WHERE @p IS NULL AND datetimeDataType IS NULL OR @p IS NOT NULL AND datetimeDataType = @p @@ -603,21 +603,21 @@ SELECT datetimeDataType FROM `AllTypes` WHERE ID = 2 BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT ID FROM `AllTypes` WHERE datetimeDataType = @p BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT ID FROM `AllTypes` WHERE datetimeDataType = @p BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT ID FROM `AllTypes` WHERE datetimeDataType = @p @@ -636,7 +636,7 @@ SELECT ID FROM `AllTypes` WHERE @p IS NULL AND timestampDataType IS NULL OR @p I BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = NULL SELECT ID FROM `AllTypes` WHERE @p IS NULL AND timestampDataType IS NULL OR @p IS NOT NULL AND timestampDataType = @p @@ -655,21 +655,21 @@ SELECT timestampDataType FROM `AllTypes` WHERE ID = 2 BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT ID FROM `AllTypes` WHERE timestampDataType = @p BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT ID FROM `AllTypes` WHERE timestampDataType = @p BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT ID FROM `AllTypes` WHERE timestampDataType = @p diff --git a/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.TestDate(MySql.8.0).sql b/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.TestDate(MySql.8.0).sql index 56e00bc5843..47be9e14bd7 100644 --- a/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.TestDate(MySql.8.0).sql +++ b/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.TestDate(MySql.8.0).sql @@ -10,14 +10,14 @@ SELECT Cast('2012-12-12' as date) BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12' SELECT @p BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12' SELECT @p diff --git a/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.TestDateTime(MySql.8.0).sql b/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.TestDateTime(MySql.8.0).sql index d5c521ec252..44a1577d53e 100644 --- a/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.TestDateTime(MySql.8.0).sql +++ b/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.TestDateTime(MySql.8.0).sql @@ -10,21 +10,21 @@ SELECT Cast('2012-12-12 12:12:12' as datetime) BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT @p BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT @p BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2012-12-12 12:12:12' SELECT @p diff --git a/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.TestProcedureTypesParameters(MySql.8.0).sql b/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.TestProcedureTypesParameters(MySql.8.0).sql index 1aa62f5addb..f1dcd68eefc 100644 --- a/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.TestProcedureTypesParameters(MySql.8.0).sql +++ b/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.TestProcedureTypesParameters(MySql.8.0).sql @@ -45,11 +45,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL @@ -150,11 +150,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL diff --git a/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.TestProcedureTypesResults(MySql.8.0).sql b/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.TestProcedureTypesResults(MySql.8.0).sql index 1aa62f5addb..f1dcd68eefc 100644 --- a/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.TestProcedureTypesResults(MySql.8.0).sql +++ b/MySql.8.0/Tests/DataProvider/MySqlTests/Tests.DataProvider.MySqlTests.TestProcedureTypesResults(MySql.8.0).sql @@ -45,11 +45,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL @@ -150,11 +150,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL diff --git a/MySql.8.0/Tests/Extensions/MySqlTests/Tests.Extensions.MySqlTests.ForUpdateTest(MySql.8.0).sql b/MySql.8.0/Tests/Extensions/MySqlTests/Tests.Extensions.MySqlTests.ForUpdateTest(MySql.8.0).sql index 543d4a9751a..b66f824da76 100644 --- a/MySql.8.0/Tests/Extensions/MySqlTests/Tests.Extensions.MySqlTests.ForUpdateTest(MySql.8.0).sql +++ b/MySql.8.0/Tests/Extensions/MySqlTests/Tests.Extensions.MySqlTests.ForUpdateTest(MySql.8.0).sql @@ -37,7 +37,7 @@ FOR UPDATE BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @p Datetime -- DateTime +DECLARE @p DateTime SET @p = '2020-02-29 17:54:55.123' INSERT INTO `ForUpdateTestTable` diff --git a/MySql.8.0/Tests/Linq/ComplexTests/Tests.Linq.ComplexTests.Issue413Test(MySql.8.0).sql b/MySql.8.0/Tests/Linq/ComplexTests/Tests.Linq.ComplexTests.Issue413Test(MySql.8.0).sql index ef820c82665..c6db87cbffb 100644 --- a/MySql.8.0/Tests/Linq/ComplexTests/Tests.Linq.ComplexTests.Issue413Test(MySql.8.0).sql +++ b/MySql.8.0/Tests/Linq/ComplexTests/Tests.Linq.ComplexTests.Issue413Test(MySql.8.0).sql @@ -140,7 +140,7 @@ DECLARE @InstrumentId Int32 SET @InstrumentId = 1 DECLARE @InstrumentCode VarChar(4) -- String SET @InstrumentCode = 'aaa1' -DECLARE @CreateDate Datetime -- DateTime +DECLARE @CreateDate DateTime SET @CreateDate = '2020-02-28 17:54:55.123' DECLARE @SourceInstrumentCode VarChar(7) -- String SET @SourceInstrumentCode = 'NOTNULL' @@ -166,7 +166,7 @@ DECLARE @InstrumentId Int32 SET @InstrumentId = 2 DECLARE @InstrumentCode VarChar(4) -- String SET @InstrumentCode = 'aaa2' -DECLARE @CreateDate Datetime -- DateTime +DECLARE @CreateDate DateTime SET @CreateDate = '2020-02-28 17:54:55.123' DECLARE @SourceInstrumentCode VarChar -- String SET @SourceInstrumentCode = NULL @@ -190,7 +190,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @cond VarChar(4) -- String SET @cond = 'aaa%' -DECLARE @uptoDate Datetime -- DateTime +DECLARE @uptoDate DateTime SET @uptoDate = '2020-02-29 17:54:55.123' SELECT diff --git a/MySql.8.0/Tests/Linq/DataTypesTests/Tests.Linq.DataTypesTests.TestDateOnly(MySql.8.0).sql b/MySql.8.0/Tests/Linq/DataTypesTests/Tests.Linq.DataTypesTests.TestDateOnly(MySql.8.0).sql index b9436a6668c..5ad1a75a21c 100644 --- a/MySql.8.0/Tests/Linq/DataTypesTests/Tests.Linq.DataTypesTests.TestDateOnly(MySql.8.0).sql +++ b/MySql.8.0/Tests/Linq/DataTypesTests/Tests.Linq.DataTypesTests.TestDateOnly(MySql.8.0).sql @@ -28,9 +28,9 @@ VALUES BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Column Datetime -- DateTime +DECLARE @Column DateTime SET @Column = '2020-02-29' -DECLARE @ColumnNullable Datetime -- DateTime +DECLARE @ColumnNullable DateTime SET @ColumnNullable = '2200-01-01' SELECT @@ -65,9 +65,9 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @Id Int32 SET @Id = 1 -DECLARE @Column Datetime -- DateTime +DECLARE @Column DateTime SET @Column = '1950-01-01' -DECLARE @ColumnNullable Datetime -- DateTime +DECLARE @ColumnNullable DateTime SET @ColumnNullable = NULL INSERT INTO `DateOnlyTable` @@ -87,9 +87,9 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @Id Int32 SET @Id = 2 -DECLARE @Column Datetime -- DateTime +DECLARE @Column DateTime SET @Column = '2020-02-29' -DECLARE @ColumnNullable Datetime -- DateTime +DECLARE @ColumnNullable DateTime SET @ColumnNullable = '2200-01-01' INSERT INTO `DateOnlyTable` diff --git a/MySql.8.0/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnNegative(MySql.8.0).sql b/MySql.8.0/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnNegative(MySql.8.0).sql index b0b4404d949..da14af999c6 100644 --- a/MySql.8.0/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnNegative(MySql.8.0).sql +++ b/MySql.8.0/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnNegative(MySql.8.0).sql @@ -4,7 +4,7 @@ DECLARE @ID Int32 SET @ID = 5000 DECLARE @MoneyValue Decimal(1, 0) SET @MoneyValue = 0 -DECLARE @DateTimeValue Datetime -- DateTime +DECLARE @DateTimeValue DateTime SET @DateTimeValue = '2018-01-03' DECLARE @BoolValue UByte -- Boolean SET @BoolValue = 0 diff --git a/MySql.8.0/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnNegativeExpression(MySql.8.0).sql b/MySql.8.0/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnNegativeExpression(MySql.8.0).sql index f078761ee66..776dec06d4a 100644 --- a/MySql.8.0/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnNegativeExpression(MySql.8.0).sql +++ b/MySql.8.0/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnNegativeExpression(MySql.8.0).sql @@ -4,7 +4,7 @@ DECLARE @ID Int32 SET @ID = 5000 DECLARE @MoneyValue Decimal(1, 0) SET @MoneyValue = 0 -DECLARE @DateTimeValue Datetime -- DateTime +DECLARE @DateTimeValue DateTime SET @DateTimeValue = '2018-01-03' DECLARE @BoolValue UByte -- Boolean SET @BoolValue = 0 diff --git a/MySql.8.0/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnPositive(MySql.8.0).sql b/MySql.8.0/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnPositive(MySql.8.0).sql index ff61a9ce732..cfa1fe14816 100644 --- a/MySql.8.0/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnPositive(MySql.8.0).sql +++ b/MySql.8.0/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnPositive(MySql.8.0).sql @@ -4,7 +4,7 @@ DECLARE @ID Int32 SET @ID = 5000 DECLARE @MoneyValue Decimal(1, 0) SET @MoneyValue = 0 -DECLARE @DateTimeValue Datetime -- DateTime +DECLARE @DateTimeValue DateTime SET @DateTimeValue = '2018-01-03' DECLARE @BoolValue UByte -- Boolean SET @BoolValue = 0 diff --git a/MySql.8.0/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnPositiveExpression(MySql.8.0).sql b/MySql.8.0/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnPositiveExpression(MySql.8.0).sql index a101c98accd..9e4d6d7820b 100644 --- a/MySql.8.0/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnPositiveExpression(MySql.8.0).sql +++ b/MySql.8.0/Tests/Linq/DateTimeFunctionsTests/Tests.Linq.DateTimeFunctionsTests.AddDaysFromColumnPositiveExpression(MySql.8.0).sql @@ -4,7 +4,7 @@ DECLARE @ID Int32 SET @ID = 5000 DECLARE @MoneyValue Decimal(1, 0) SET @MoneyValue = 0 -DECLARE @DateTimeValue Datetime -- DateTime +DECLARE @DateTimeValue DateTime SET @DateTimeValue = '2018-01-03' DECLARE @BoolValue UByte -- Boolean SET @BoolValue = 0 diff --git a/MySql.8.0/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Issue3761Test1(MySql.8.0).sql b/MySql.8.0/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Issue3761Test1(MySql.8.0).sql index f22145744b7..b51413d4cfa 100644 --- a/MySql.8.0/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Issue3761Test1(MySql.8.0).sql +++ b/MySql.8.0/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Issue3761Test1(MySql.8.0).sql @@ -18,7 +18,7 @@ CREATE TABLE IF NOT EXISTS `Issue3761Table` BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @DATUM Datetime -- DateTime +DECLARE @DATUM DateTime SET @DATUM = '2019-01-01' SELECT diff --git a/MySql.8.0/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Issue3761Test2(MySql.8.0).sql b/MySql.8.0/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Issue3761Test2(MySql.8.0).sql index a059bf29348..add32d69692 100644 --- a/MySql.8.0/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Issue3761Test2(MySql.8.0).sql +++ b/MySql.8.0/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Issue3761Test2(MySql.8.0).sql @@ -18,7 +18,7 @@ CREATE TABLE IF NOT EXISTS `Issue3761Table` BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @DATUM Datetime -- DateTime +DECLARE @DATUM DateTime SET @DATUM = '2019-01-01' SELECT diff --git a/MySql.8.0/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Issue680Test(MySql.8.0).sql b/MySql.8.0/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Issue680Test(MySql.8.0).sql index 6ec4548f99d..5649342e00b 100644 --- a/MySql.8.0/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Issue680Test(MySql.8.0).sql +++ b/MySql.8.0/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Issue680Test(MySql.8.0).sql @@ -13,7 +13,7 @@ CREATE TABLE IF NOT EXISTS `Issue680Table` BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = '2020-02-29 17:54:55.123' SELECT diff --git a/MySql.8.0/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Max4(MySql.8.0).sql b/MySql.8.0/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Max4(MySql.8.0).sql index ae0edcff21c..b93a225cdec 100644 --- a/MySql.8.0/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Max4(MySql.8.0).sql +++ b/MySql.8.0/Tests/Linq/GroupByTests/Tests.Linq.GroupByTests.Max4(MySql.8.0).sql @@ -1,6 +1,6 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = '2020-02-29' SELECT diff --git a/MySql.8.0/Tests/Linq/IdlTests/Tests.Linq.IdlTests.TestContainsForNullableDateTimeWithNullAndNotNullValues2(MySql.8.0).sql b/MySql.8.0/Tests/Linq/IdlTests/Tests.Linq.IdlTests.TestContainsForNullableDateTimeWithNullAndNotNullValues2(MySql.8.0).sql index 393011a8154..0feaa8f6eab 100644 --- a/MySql.8.0/Tests/Linq/IdlTests/Tests.Linq.IdlTests.TestContainsForNullableDateTimeWithNullAndNotNullValues2(MySql.8.0).sql +++ b/MySql.8.0/Tests/Linq/IdlTests/Tests.Linq.IdlTests.TestContainsForNullableDateTimeWithNullAndNotNullValues2(MySql.8.0).sql @@ -17,7 +17,7 @@ FROM BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @DateTimeValue2 Datetime -- DateTime +DECLARE @DateTimeValue2 DateTime SET @DateTimeValue2 = '2009-09-24 09:19:29.090' SELECT diff --git a/MySql.8.0/Tests/Linq/IssueTests/Tests.Linq.IssueTests.Issue42Test(MySql.8.0).sql b/MySql.8.0/Tests/Linq/IssueTests/Tests.Linq.IssueTests.Issue42Test(MySql.8.0).sql index 46b11940a2a..45104bf9b23 100644 --- a/MySql.8.0/Tests/Linq/IssueTests/Tests.Linq.IssueTests.Issue42Test(MySql.8.0).sql +++ b/MySql.8.0/Tests/Linq/IssueTests/Tests.Linq.IssueTests.Issue42Test(MySql.8.0).sql @@ -42,9 +42,9 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @MoneyValue Decimal(5, 4) SET @MoneyValue = 1.1100 -DECLARE @DateTimeValue Datetime -- DateTime +DECLARE @DateTimeValue DateTime SET @DateTimeValue = '2001-01-11 01:11:21.100' -DECLARE @DateTimeValue2 Datetime -- DateTime +DECLARE @DateTimeValue2 DateTime SET @DateTimeValue2 = NULL DECLARE @BoolValue UByte -- Boolean SET @BoolValue = 0 @@ -102,9 +102,9 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @MoneyValue Decimal(5, 4) SET @MoneyValue = 1.1100 -DECLARE @DateTimeValue Datetime -- DateTime +DECLARE @DateTimeValue DateTime SET @DateTimeValue = '2001-01-11 01:11:21.100' -DECLARE @DateTimeValue2 Datetime -- DateTime +DECLARE @DateTimeValue2 DateTime SET @DateTimeValue2 = NULL DECLARE @BoolValue UByte -- Boolean SET @BoolValue = 1 diff --git a/MySql.8.0/Tests/Linq/ParameterTests/Tests.Linq.ParameterTests.Issue1189Test(MySql.8.0).sql b/MySql.8.0/Tests/Linq/ParameterTests/Tests.Linq.ParameterTests.Issue1189Test(MySql.8.0).sql index 7d6d7c95f5a..25e0f3a8252 100644 --- a/MySql.8.0/Tests/Linq/ParameterTests/Tests.Linq.ParameterTests.Issue1189Test(MySql.8.0).sql +++ b/MySql.8.0/Tests/Linq/ParameterTests/Tests.Linq.ParameterTests.Issue1189Test(MySql.8.0).sql @@ -16,7 +16,7 @@ CREATE TABLE IF NOT EXISTS `Issue1189Customer` BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = '2020-02-29 17:54:55.123' SELECT diff --git a/MySql.8.0/Tests/Linq/SelectTests/Tests.Linq.SelectTests.SelectNullableTest1(MySql.8.0).sql b/MySql.8.0/Tests/Linq/SelectTests/Tests.Linq.SelectTests.SelectNullableTest1(MySql.8.0).sql index 6d84aa11143..f663ef0a609 100644 --- a/MySql.8.0/Tests/Linq/SelectTests/Tests.Linq.SelectTests.SelectNullableTest1(MySql.8.0).sql +++ b/MySql.8.0/Tests/Linq/SelectTests/Tests.Linq.SelectTests.SelectNullableTest1(MySql.8.0).sql @@ -4,9 +4,9 @@ DECLARE @ID Int32 SET @ID = 1000 DECLARE @MoneyValue Decimal(1, 0) SET @MoneyValue = 0 -DECLARE @DateTimeValue Datetime -- DateTime +DECLARE @DateTimeValue DateTime SET @DateTimeValue = NULL -DECLARE @DateTimeValue2 Datetime -- DateTime +DECLARE @DateTimeValue2 DateTime SET @DateTimeValue2 = NULL DECLARE @BoolValue UByte -- Boolean SET @BoolValue = 0 diff --git a/MySql.8.0/Tests/Linq/SelectTests/Tests.Linq.SelectTests.SelectNullableTest2(MySql.8.0).sql b/MySql.8.0/Tests/Linq/SelectTests/Tests.Linq.SelectTests.SelectNullableTest2(MySql.8.0).sql index e3a2dec7cf3..2e2d559f9ba 100644 --- a/MySql.8.0/Tests/Linq/SelectTests/Tests.Linq.SelectTests.SelectNullableTest2(MySql.8.0).sql +++ b/MySql.8.0/Tests/Linq/SelectTests/Tests.Linq.SelectTests.SelectNullableTest2(MySql.8.0).sql @@ -4,9 +4,9 @@ DECLARE @ID Int32 SET @ID = 1000 DECLARE @MoneyValue Decimal(1, 0) SET @MoneyValue = 0 -DECLARE @DateTimeValue Datetime -- DateTime +DECLARE @DateTimeValue DateTime SET @DateTimeValue = NULL -DECLARE @DateTimeValue2 Datetime -- DateTime +DECLARE @DateTimeValue2 DateTime SET @DateTimeValue2 = NULL DECLARE @BoolValue UByte -- Boolean SET @BoolValue = 0 diff --git a/MySql.8.0/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTime1(MySql.8.0).sql b/MySql.8.0/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTime1(MySql.8.0).sql index 013665915c6..e1807007e89 100644 --- a/MySql.8.0/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTime1(MySql.8.0).sql +++ b/MySql.8.0/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTime1(MySql.8.0).sql @@ -1,6 +1,6 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = '2009-09-20' SELECT diff --git a/MySql.8.0/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTime21(MySql.8.0).sql b/MySql.8.0/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTime21(MySql.8.0).sql index 0d7fc720b08..de57a2d062c 100644 --- a/MySql.8.0/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTime21(MySql.8.0).sql +++ b/MySql.8.0/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTime21(MySql.8.0).sql @@ -20,7 +20,7 @@ LIMIT 1 BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @dt Datetime -- DateTime +DECLARE @dt DateTime SET @dt = '2010-12-14 05:00:07.425' UPDATE @@ -52,7 +52,7 @@ LIMIT 1 BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @pdt Datetime -- DateTime +DECLARE @pdt DateTime SET @pdt = '2001-01-11 01:11:21.100' UPDATE diff --git a/MySql.8.0/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTimeArray1(MySql.8.0).sql b/MySql.8.0/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTimeArray1(MySql.8.0).sql index 191c883990d..7ab24843767 100644 --- a/MySql.8.0/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTimeArray1(MySql.8.0).sql +++ b/MySql.8.0/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTimeArray1(MySql.8.0).sql @@ -1,6 +1,6 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @DateTimeValue Datetime -- DateTime +DECLARE @DateTimeValue DateTime SET @DateTimeValue = '2001-01-11 01:11:21.100' SELECT diff --git a/MySql.8.0/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTimeParams(MySql.8.0).sql b/MySql.8.0/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTimeParams(MySql.8.0).sql index 4a47825d0b9..7dc41a3a0be 100644 --- a/MySql.8.0/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTimeParams(MySql.8.0).sql +++ b/MySql.8.0/Tests/Linq/TypesTests/Tests.Linq.TypesTests.DateTimeParams(MySql.8.0).sql @@ -1,6 +1,6 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @dateTime Datetime -- DateTime +DECLARE @dateTime DateTime SET @dateTime = '1992-01-11 01:11:21.100' SELECT @@ -13,7 +13,7 @@ LIMIT 1 BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @dateTime Datetime -- DateTime +DECLARE @dateTime DateTime SET @dateTime = '1993-01-11 01:11:21.100' SELECT diff --git a/MySql.8.0/Tests/Linq/ValueConversionTests/Tests.Linq.ValueConversionTests.Insert(MySql.8.0).sql b/MySql.8.0/Tests/Linq/ValueConversionTests/Tests.Linq.ValueConversionTests.Insert(MySql.8.0).sql index ed9151fa177..349e76795d3 100644 --- a/MySql.8.0/Tests/Linq/ValueConversionTests/Tests.Linq.ValueConversionTests.Insert(MySql.8.0).sql +++ b/MySql.8.0/Tests/Linq/ValueConversionTests/Tests.Linq.ValueConversionTests.Insert(MySql.8.0).sql @@ -150,7 +150,7 @@ DECLARE @BoolValue VarChar -- AnsiString SET @BoolValue = 'Y' DECLARE @AnotherBoolValue VarChar -- AnsiString SET @AnotherBoolValue = 'T' -DECLARE @DateTimeNullable Datetime -- DateTime +DECLARE @DateTimeNullable DateTime SET @DateTimeNullable = NULL INSERT INTO `ValueConversion` diff --git a/MySql.8.0/Tests/Linq/ValueConversionTests/Tests.Linq.ValueConversionTests.Update(MySql.8.0).sql b/MySql.8.0/Tests/Linq/ValueConversionTests/Tests.Linq.ValueConversionTests.Update(MySql.8.0).sql index e2f9a2e5f30..38788b9d831 100644 --- a/MySql.8.0/Tests/Linq/ValueConversionTests/Tests.Linq.ValueConversionTests.Update(MySql.8.0).sql +++ b/MySql.8.0/Tests/Linq/ValueConversionTests/Tests.Linq.ValueConversionTests.Update(MySql.8.0).sql @@ -107,7 +107,7 @@ DECLARE @BoolValue VarChar -- AnsiString SET @BoolValue = 'N' DECLARE @AnotherBoolValue VarChar -- AnsiString SET @AnotherBoolValue = 'F' -DECLARE @DateTimeNullable Datetime -- DateTime +DECLARE @DateTimeNullable DateTime SET @DateTimeNullable = NULL DECLARE @Id Int32 SET @Id = 2 @@ -165,7 +165,7 @@ DECLARE @BoolValue VarChar -- AnsiString SET @BoolValue = 'N' DECLARE @AnotherBoolValue VarChar -- AnsiString SET @AnotherBoolValue = 'F' -DECLARE @DateTimeNullable Datetime -- DateTime +DECLARE @DateTimeNullable DateTime SET @DateTimeNullable = NULL DECLARE @Id Int32 SET @Id = 3 diff --git a/MySql.8.0/Tests/Linq/WhereTests/Tests.Linq.WhereTests.WhereDateTimeTest4(MySql.8.0).sql b/MySql.8.0/Tests/Linq/WhereTests/Tests.Linq.WhereTests.WhereDateTimeTest4(MySql.8.0).sql index 33e4367a365..d92b38b9b79 100644 --- a/MySql.8.0/Tests/Linq/WhereTests/Tests.Linq.WhereTests.WhereDateTimeTest4(MySql.8.0).sql +++ b/MySql.8.0/Tests/Linq/WhereTests/Tests.Linq.WhereTests.WhereDateTimeTest4(MySql.8.0).sql @@ -1,6 +1,6 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @DateTimeValue Datetime -- DateTime +DECLARE @DateTimeValue DateTime SET @DateTimeValue = '2009-09-27' SELECT diff --git a/MySql.8.0/Tests/SchemaProvider/SchemaProviderTests/Tests.SchemaProvider.SchemaProviderTests.IncludeExcludeCatalogTest(MySql.8.0).sql b/MySql.8.0/Tests/SchemaProvider/SchemaProviderTests/Tests.SchemaProvider.SchemaProviderTests.IncludeExcludeCatalogTest(MySql.8.0).sql index 1699f1822c8..4f2f5c7131f 100644 --- a/MySql.8.0/Tests/SchemaProvider/SchemaProviderTests/Tests.SchemaProvider.SchemaProviderTests.IncludeExcludeCatalogTest(MySql.8.0).sql +++ b/MySql.8.0/Tests/SchemaProvider/SchemaProviderTests/Tests.SchemaProvider.SchemaProviderTests.IncludeExcludeCatalogTest(MySql.8.0).sql @@ -121,11 +121,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL @@ -226,11 +226,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL diff --git a/MySql.8.0/Tests/SchemaProvider/SchemaProviderTests/Tests.SchemaProvider.SchemaProviderTests.MySqlPKTest(MySql.8.0).sql b/MySql.8.0/Tests/SchemaProvider/SchemaProviderTests/Tests.SchemaProvider.SchemaProviderTests.MySqlPKTest(MySql.8.0).sql index 01dff9ff1ae..7d59866e9e2 100644 --- a/MySql.8.0/Tests/SchemaProvider/SchemaProviderTests/Tests.SchemaProvider.SchemaProviderTests.MySqlPKTest(MySql.8.0).sql +++ b/MySql.8.0/Tests/SchemaProvider/SchemaProviderTests/Tests.SchemaProvider.SchemaProviderTests.MySqlPKTest(MySql.8.0).sql @@ -121,11 +121,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL @@ -226,11 +226,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL diff --git a/MySql.8.0/Tests/SchemaProvider/SchemaProviderTests/Tests.SchemaProvider.SchemaProviderTests.MySqlTest(MySql.8.0).sql b/MySql.8.0/Tests/SchemaProvider/SchemaProviderTests/Tests.SchemaProvider.SchemaProviderTests.MySqlTest(MySql.8.0).sql index 01dff9ff1ae..7d59866e9e2 100644 --- a/MySql.8.0/Tests/SchemaProvider/SchemaProviderTests/Tests.SchemaProvider.SchemaProviderTests.MySqlTest(MySql.8.0).sql +++ b/MySql.8.0/Tests/SchemaProvider/SchemaProviderTests/Tests.SchemaProvider.SchemaProviderTests.MySqlTest(MySql.8.0).sql @@ -121,11 +121,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL @@ -226,11 +226,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL diff --git a/MySql.8.0/Tests/SchemaProvider/SchemaProviderTests/Tests.SchemaProvider.SchemaProviderTests.PrimaryForeignKeyTest(MySql.8.0).sql b/MySql.8.0/Tests/SchemaProvider/SchemaProviderTests/Tests.SchemaProvider.SchemaProviderTests.PrimaryForeignKeyTest(MySql.8.0).sql index 01dff9ff1ae..7d59866e9e2 100644 --- a/MySql.8.0/Tests/SchemaProvider/SchemaProviderTests/Tests.SchemaProvider.SchemaProviderTests.PrimaryForeignKeyTest(MySql.8.0).sql +++ b/MySql.8.0/Tests/SchemaProvider/SchemaProviderTests/Tests.SchemaProvider.SchemaProviderTests.PrimaryForeignKeyTest(MySql.8.0).sql @@ -121,11 +121,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL @@ -226,11 +226,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL diff --git a/MySql.8.0/Tests/SchemaProvider/SchemaProviderTests/Tests.SchemaProvider.SchemaProviderTests.Test(MySql.8.0).sql b/MySql.8.0/Tests/SchemaProvider/SchemaProviderTests/Tests.SchemaProvider.SchemaProviderTests.Test(MySql.8.0).sql index 01dff9ff1ae..7d59866e9e2 100644 --- a/MySql.8.0/Tests/SchemaProvider/SchemaProviderTests/Tests.SchemaProvider.SchemaProviderTests.Test(MySql.8.0).sql +++ b/MySql.8.0/Tests/SchemaProvider/SchemaProviderTests/Tests.SchemaProvider.SchemaProviderTests.Test(MySql.8.0).sql @@ -121,11 +121,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL @@ -226,11 +226,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL diff --git a/MySql.8.0/Tests/SchemaProvider/SchemaProviderTests/Tests.SchemaProvider.SchemaProviderTests.TestApiImplemented(MySql.8.0).sql b/MySql.8.0/Tests/SchemaProvider/SchemaProviderTests/Tests.SchemaProvider.SchemaProviderTests.TestApiImplemented(MySql.8.0).sql index 01dff9ff1ae..7d59866e9e2 100644 --- a/MySql.8.0/Tests/SchemaProvider/SchemaProviderTests/Tests.SchemaProvider.SchemaProviderTests.TestApiImplemented(MySql.8.0).sql +++ b/MySql.8.0/Tests/SchemaProvider/SchemaProviderTests/Tests.SchemaProvider.SchemaProviderTests.TestApiImplemented(MySql.8.0).sql @@ -121,11 +121,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL @@ -226,11 +226,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL diff --git a/MySql.8.0/Tests/UserTests/Issue1110Tests/Tests.UserTests.Issue1110Tests.Test(MySql.8.0).sql b/MySql.8.0/Tests/UserTests/Issue1110Tests/Tests.UserTests.Issue1110Tests.Test(MySql.8.0).sql index 633b50a4610..92ac6afbc9b 100644 --- a/MySql.8.0/Tests/UserTests/Issue1110Tests/Tests.UserTests.Issue1110Tests.Test(MySql.8.0).sql +++ b/MySql.8.0/Tests/UserTests/Issue1110Tests/Tests.UserTests.Issue1110Tests.Test(MySql.8.0).sql @@ -18,7 +18,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @Id Int32 SET @Id = 10 -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = '2020-02-29 17:54:55.123' INSERT INTO `Issue1110TB` diff --git a/MySql.8.0/Tests/UserTests/Issue1305Tests/Tests.UserTests.Issue1305Tests.TestAttributeMapping(MySql.8.0).sql b/MySql.8.0/Tests/UserTests/Issue1305Tests/Tests.UserTests.Issue1305Tests.TestAttributeMapping(MySql.8.0).sql index bf57ba2b8c8..93bbd7025fe 100644 --- a/MySql.8.0/Tests/UserTests/Issue1305Tests/Tests.UserTests.Issue1305Tests.TestAttributeMapping(MySql.8.0).sql +++ b/MySql.8.0/Tests/UserTests/Issue1305Tests/Tests.UserTests.Issue1305Tests.TestAttributeMapping(MySql.8.0).sql @@ -143,11 +143,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL @@ -248,11 +248,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL diff --git a/MySql.8.0/Tests/UserTests/Issue1305Tests/Tests.UserTests.Issue1305Tests.TestFluentMapping(MySql.8.0).sql b/MySql.8.0/Tests/UserTests/Issue1305Tests/Tests.UserTests.Issue1305Tests.TestFluentMapping(MySql.8.0).sql index 99b7892005b..935f017c31e 100644 --- a/MySql.8.0/Tests/UserTests/Issue1305Tests/Tests.UserTests.Issue1305Tests.TestFluentMapping(MySql.8.0).sql +++ b/MySql.8.0/Tests/UserTests/Issue1305Tests/Tests.UserTests.Issue1305Tests.TestFluentMapping(MySql.8.0).sql @@ -141,11 +141,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL @@ -246,11 +246,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL diff --git a/MySql.8.0/Tests/UserTests/Issue792Tests/Tests.UserTests.Issue792Tests.TestWithoutTransaction(MySql.8.0).sql b/MySql.8.0/Tests/UserTests/Issue792Tests/Tests.UserTests.Issue792Tests.TestWithoutTransaction(MySql.8.0).sql index e555d66eaf4..8b69745a223 100644 --- a/MySql.8.0/Tests/UserTests/Issue792Tests/Tests.UserTests.Issue792Tests.TestWithoutTransaction(MySql.8.0).sql +++ b/MySql.8.0/Tests/UserTests/Issue792Tests/Tests.UserTests.Issue792Tests.TestWithoutTransaction(MySql.8.0).sql @@ -53,11 +53,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL @@ -158,11 +158,11 @@ DECLARE @MediumText VarChar(16777215) -- String SET @MediumText = NULL DECLARE @LongText VarChar -- String SET @LongText = NULL -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = NULL -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = NULL -DECLARE @TimeStamp Datetime -- DateTime +DECLARE @TimeStamp DateTime SET @TimeStamp = NULL DECLARE @Time Time SET @Time = NULL diff --git a/MySql.8.0/Tests/xUpdate/BulkCopyTests/Tests.xUpdate.BulkCopyTests.BulkCopyDateOnly(MySql.8.0,RowByRow).sql b/MySql.8.0/Tests/xUpdate/BulkCopyTests/Tests.xUpdate.BulkCopyTests.BulkCopyDateOnly(MySql.8.0,RowByRow).sql index 309a623c05c..133cf664502 100644 --- a/MySql.8.0/Tests/xUpdate/BulkCopyTests/Tests.xUpdate.BulkCopyTests.BulkCopyDateOnly(MySql.8.0,RowByRow).sql +++ b/MySql.8.0/Tests/xUpdate/BulkCopyTests/Tests.xUpdate.BulkCopyTests.BulkCopyDateOnly(MySql.8.0,RowByRow).sql @@ -13,7 +13,7 @@ CREATE TABLE IF NOT EXISTS `DateOnlyTable` BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 -DECLARE @Date Datetime -- DateTime +DECLARE @Date DateTime SET @Date = '2021-01-01' INSERT INTO `DateOnlyTable` diff --git a/MySql.8.0/Tests/xUpdate/CreateTableTypesTests/Tests.xUpdate.CreateTableTypesTests.TestCreateTableColumnType(MySql.8.0,DateTime).sql b/MySql.8.0/Tests/xUpdate/CreateTableTypesTests/Tests.xUpdate.CreateTableTypesTests.TestCreateTableColumnType(MySql.8.0,DateTime).sql index e33fc131529..5114fb9cd7a 100644 --- a/MySql.8.0/Tests/xUpdate/CreateTableTypesTests/Tests.xUpdate.CreateTableTypesTests.TestCreateTableColumnType(MySql.8.0,DateTime).sql +++ b/MySql.8.0/Tests/xUpdate/CreateTableTypesTests/Tests.xUpdate.CreateTableTypesTests.TestCreateTableColumnType(MySql.8.0,DateTime).sql @@ -16,7 +16,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @Id Int32 SET @Id = 1 -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = '2000-01-01' INSERT INTO `CreateTableTypes` @@ -34,7 +34,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @Id Int32 SET @Id = 2 -DECLARE @DateTime Datetime -- DateTime +DECLARE @DateTime DateTime SET @DateTime = '2018-11-24 01:02:03' INSERT INTO `CreateTableTypes` diff --git a/MySql.8.0/Tests/xUpdate/CreateTableTypesTests/Tests.xUpdate.CreateTableTypesTests.TestCreateTableColumnType(MySql.8.0,DateTimeNullable).sql b/MySql.8.0/Tests/xUpdate/CreateTableTypesTests/Tests.xUpdate.CreateTableTypesTests.TestCreateTableColumnType(MySql.8.0,DateTimeNullable).sql index eb62dd40afb..9a17bf8bd54 100644 --- a/MySql.8.0/Tests/xUpdate/CreateTableTypesTests/Tests.xUpdate.CreateTableTypesTests.TestCreateTableColumnType(MySql.8.0,DateTimeNullable).sql +++ b/MySql.8.0/Tests/xUpdate/CreateTableTypesTests/Tests.xUpdate.CreateTableTypesTests.TestCreateTableColumnType(MySql.8.0,DateTimeNullable).sql @@ -16,7 +16,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @Id Int32 SET @Id = 1 -DECLARE @DateTimeNullable Datetime -- DateTime +DECLARE @DateTimeNullable DateTime SET @DateTimeNullable = NULL INSERT INTO `CreateTableTypes` @@ -34,7 +34,7 @@ BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 DECLARE @Id Int32 SET @Id = 2 -DECLARE @DateTimeNullable Datetime -- DateTime +DECLARE @DateTimeNullable DateTime SET @DateTimeNullable = '2018-11-25 01:02:03' INSERT INTO `CreateTableTypes` diff --git a/MySql.8.0/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsyncCanceled(MySql.8.0).sql b/MySql.8.0/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsyncCanceled(MySql.8.0).sql index ef213261ba1..357ed768e82 100644 --- a/MySql.8.0/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsyncCanceled(MySql.8.0).sql +++ b/MySql.8.0/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsyncCanceled(MySql.8.0).sql @@ -19,36 +19,6 @@ CREATE TEMPORARY TABLE `TempTable` `ID` INT NOT NULL ) -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) - -INSERT INTO `TempTable` -( - `ID` -) -VALUES -(1), -(2), -(3), -(4), -(5), -(6), -(7) - -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -SELECT - `t`.`ID` -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` - BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 diff --git a/MySql.8.0/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsyncCanceled2(MySql.8.0).sql b/MySql.8.0/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsyncCanceled2(MySql.8.0).sql index 7cb8aa850de..7578159dd63 100644 --- a/MySql.8.0/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsyncCanceled2(MySql.8.0).sql +++ b/MySql.8.0/Tests/xUpdate/CreateTempTableTests/Tests.xUpdate.CreateTempTableTests.CreateTableAsyncCanceled2(MySql.8.0).sql @@ -23,15 +23,6 @@ SELECT FROM `Parent` `p` -BeforeExecute --- MySql.8.0 MySql.8.0.MySql.Data MySql80 - -SELECT - `t`.`ID` -FROM - `Parent` `p` - INNER JOIN `TempTable` `t` ON `p`.`ParentID` = `t`.`ID` - BeforeExecute -- MySql.8.0 MySql.8.0.MySql.Data MySql80 (asynchronously) diff --git a/MySql.8.0/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertArray4(MySql.8.0).sql b/MySql.8.0/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertArray4(MySql.8.0).sql index bd86bd4f5f2..12a5e82d2a1 100644 --- a/MySql.8.0/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertArray4(MySql.8.0).sql +++ b/MySql.8.0/Tests/xUpdate/InsertTests/Tests.xUpdate.InsertTests.InsertArray4(MySql.8.0).sql @@ -13,7 +13,7 @@ DECLARE @ID Int32 SET @ID = 1001 DECLARE @MoneyValue Decimal(1, 0) SET @MoneyValue = 0 -DECLARE @DateTimeValue Datetime -- DateTime +DECLARE @DateTimeValue DateTime SET @DateTimeValue = NULL DECLARE @BoolValue UByte -- Boolean SET @BoolValue = 1 diff --git a/MySql.8.0/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.TestMergeTypes(MySql.8.0).sql b/MySql.8.0/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.TestMergeTypes(MySql.8.0).sql index 3ab89b1db2b..16d9b5d8904 100644 Binary files a/MySql.8.0/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.TestMergeTypes(MySql.8.0).sql and b/MySql.8.0/Tests/xUpdate/MergeTests/Tests.xUpdate.MergeTests.TestMergeTypes(MySql.8.0).sql differ diff --git a/MySql.8.0/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateIssue321Regression(MySql.8.0).sql b/MySql.8.0/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateIssue321Regression(MySql.8.0).sql index 15749e7ab25..08624f5fef7 100644 --- a/MySql.8.0/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateIssue321Regression(MySql.8.0).sql +++ b/MySql.8.0/Tests/xUpdate/UpdateTests/Tests.xUpdate.UpdateTests.UpdateIssue321Regression(MySql.8.0).sql @@ -4,9 +4,9 @@ DECLARE @ID Int32 SET @ID = 100500 DECLARE @MoneyValue Decimal(4, 0) SET @MoneyValue = 3000 -DECLARE @DateTimeValue Datetime -- DateTime +DECLARE @DateTimeValue DateTime SET @DateTimeValue = NULL -DECLARE @DateTimeValue2 Datetime -- DateTime +DECLARE @DateTimeValue2 DateTime SET @DateTimeValue2 = NULL DECLARE @BoolValue UByte -- Boolean SET @BoolValue = NULL diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ConvertorTests/LinqToDB.EntityFrameworkCore.Tests.ConvertorTests.TestToList(SQLite.MS).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ConvertorTests/LinqToDB.EntityFrameworkCore.Tests.ConvertorTests.TestToList(SQLite.MS).sql new file mode 100644 index 00000000000..0518d933fa9 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ConvertorTests/LinqToDB.EntityFrameworkCore.Tests.ConvertorTests.TestToList(SQLite.MS).sql @@ -0,0 +1,5 @@ +SELECT "s"."Id", "s"."Code", "s"."IsDeleted", "s"."Name", "s"."PermanentId" +FROM "Subdivisions" AS "s" +WHERE CAST("s"."Id" AS INTEGER) = 1 + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestAmbiguousProperties(SQLite.MS).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestAmbiguousProperties(SQLite.MS).sql new file mode 100644 index 00000000000..caa6900711c --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestAmbiguousProperties(SQLite.MS).sql @@ -0,0 +1,5 @@ +SELECT "w"."Id", "w"."Value" +FROM "WithDuplicateProperties" AS "w" +WHERE "w"."Value" = 1 + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestInheritance(SQLite.MS).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestInheritance(SQLite.MS).sql new file mode 100644 index 00000000000..be039037fa3 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestInheritance(SQLite.MS).sql @@ -0,0 +1,40 @@ +Parameters: +@p0='?' (Size = 16) + +INSERT INTO "WithInheritance" ("Discriminator") +VALUES (@p0) +RETURNING "Id"; + + +Parameters: +@p0='?' (Size = 17) + +INSERT INTO "WithInheritance" ("Discriminator") +VALUES (@p0) +RETURNING "Id"; + + +Parameters: +@p0='?' (Size = 17) + +INSERT INTO "WithInheritance" ("Discriminator") +VALUES (@p0) +RETURNING "Id"; + + +Parameters: +@p0='?' (Size = 17) + +INSERT INTO "WithInheritance" ("Discriminator") +VALUES (@p0) +RETURNING "Id"; + + +Parameters: +@p0='?' (Size = 17) + +INSERT INTO "WithInheritance" ("Discriminator") +VALUES (@p0) +RETURNING "Id"; + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestUIntTable(SQLite.MS).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestUIntTable(SQLite.MS).sql new file mode 100644 index 00000000000..0ea16218698 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestUIntTable(SQLite.MS).sql @@ -0,0 +1,8 @@ +Parameters: +@p0='?' (DbType = UInt16), @p1='?' (DbType = UInt16), @p2='?' (DbType = UInt32), @p3='?' (DbType = UInt32), @p4='?' (DbType = UInt64), @p5='?' (DbType = UInt64) + +INSERT INTO "UIntTable" ("Field16", "Field16N", "Field32", "Field32N", "Field64", "Field64N") +VALUES (@p0, @p1, @p2, @p3, @p4, @p5) +RETURNING "ID"; + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SQLite.MS,Default).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SQLite.MS,Default).sql new file mode 100644 index 00000000000..86f43093e32 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SQLite.MS,Default).sql @@ -0,0 +1,4 @@ +SELECT "b"."Id", "b"."BlogType", "b"."Url" +FROM "Blogs" AS "b" + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SQLite.MS,MultipleRows).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SQLite.MS,MultipleRows).sql new file mode 100644 index 00000000000..86f43093e32 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SQLite.MS,MultipleRows).sql @@ -0,0 +1,4 @@ +SELECT "b"."Id", "b"."BlogType", "b"."Url" +FROM "Blogs" AS "b" + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SQLite.MS,ProviderSpecific).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SQLite.MS,ProviderSpecific).sql new file mode 100644 index 00000000000..86f43093e32 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SQLite.MS,ProviderSpecific).sql @@ -0,0 +1,4 @@ +SELECT "b"."Id", "b"."BlogType", "b"."Url" +FROM "Blogs" AS "b" + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SQLite.MS,RowByRow).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SQLite.MS,RowByRow).sql new file mode 100644 index 00000000000..86f43093e32 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SQLite.MS,RowByRow).sql @@ -0,0 +1,4 @@ +SELECT "b"."Id", "b"."BlogType", "b"."Url" +FROM "Blogs" AS "b" + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InterceptorTests/LinqToDB.EntityFrameworkCore.Tests.InterceptorTests.TestEfCoreSideOfComboInterceptor(SQLite.MS).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InterceptorTests/LinqToDB.EntityFrameworkCore.Tests.InterceptorTests.TestEfCoreSideOfComboInterceptor(SQLite.MS).sql new file mode 100644 index 00000000000..9e63c4c64e2 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InterceptorTests/LinqToDB.EntityFrameworkCore.Tests.InterceptorTests.TestEfCoreSideOfComboInterceptor(SQLite.MS).sql @@ -0,0 +1,10 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__p_0='?' (DbType = Int32) + +SELECT "p"."ProductID", "p"."CategoryID", "p"."Discontinued", "p"."IsDeleted", "p"."ProductName", "p"."QuantityPerUnit", "p"."ReorderLevel", "p"."SupplierID", "p"."UnitPrice", "p"."UnitsInStock", "p"."UnitsOnOrder" +FROM "Products" AS "p" +WHERE (@__ef_filter__p_0 OR NOT ("p"."IsDeleted") OR NOT ("p"."IsDeleted")) AND "p"."ProductID" > 0 +ORDER BY "p"."ProductID" +LIMIT @__p_0 + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue117Test(SQLite.MS).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue117Test(SQLite.MS).sql new file mode 100644 index 00000000000..96b6cc1a760 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue117Test(SQLite.MS).sql @@ -0,0 +1,9 @@ +Parameters: +@__userId_1='?' (DbType = Int32), @__userId_0='?' (DbType = Int32) + +SELECT "p"."Id" AS "PatentId", @__userId_1 AS "UserId" +FROM "Patents" AS "p" +LEFT JOIN "PatentAssessment" AS "p0" ON "p"."Id" = "p0"."PatentId" +WHERE "p0"."PatentId" IS NULL OR "p0"."TechnicalReviewerId" <> @__userId_0 OR "p0"."TechnicalReviewerId" IS NULL + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue73Test(SQLite.MS).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue73Test(SQLite.MS).sql new file mode 100644 index 00000000000..3db48c7368c --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue73Test(SQLite.MS).sql @@ -0,0 +1,6 @@ +SELECT COALESCE("i0"."Name", '') || '>' || "i"."Name" +FROM "Issue73Entities" AS "i" +LEFT JOIN "Issue73Entities" AS "i0" ON "i"."ParentId" = "i0"."Id" +WHERE "i"."Name" = 'Name1_3' + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.NavigationProperties(SQLite.MS).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.NavigationProperties(SQLite.MS).sql new file mode 100644 index 00000000000..3d9761fc837 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.NavigationProperties(SQLite.MS).sql @@ -0,0 +1,24 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT "o"."OrderID", "o1"."OrderID", "o1"."ProductID", "p0"."ProductID", "o3"."OrderId", "o3"."ProductId", "o3"."Quantity", "o1"."Quantity", "p0"."ProductName" +FROM "Orders" AS "o" +INNER JOIN ( + SELECT "o0"."OrderID", "o0"."ProductID", "o0"."Quantity" + FROM "Order Details" AS "o0" + WHERE @__ef_filter__p_1 OR NOT ("o0"."IsDeleted") OR NOT ("o0"."IsDeleted") +) AS "o1" ON "o"."OrderID" = "o1"."OrderID" +INNER JOIN ( + SELECT "p"."ProductID", "p"."ProductName" + FROM "Products" AS "p" + WHERE @__ef_filter__p_2 OR NOT ("p"."IsDeleted") OR NOT ("p"."IsDeleted") +) AS "p0" ON "o1"."ProductID" = "p0"."ProductID" +LEFT JOIN ( + SELECT "o2"."OrderID" AS "OrderId", "o2"."ProductID" AS "ProductId", "o2"."Quantity" + FROM "Order Details" AS "o2" + WHERE @__ef_filter__p_1 OR NOT ("o2"."IsDeleted") OR NOT ("o2"."IsDeleted") +) AS "o3" ON "p0"."ProductID" = "o3"."ProductId" +WHERE @__ef_filter__p_0 OR NOT ("o"."IsDeleted") OR NOT ("o"."IsDeleted") +ORDER BY "o"."OrderID", "o1"."OrderID", "o1"."ProductID", "p0"."ProductID", "o3"."OrderId" + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SQLite.MS,False).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SQLite.MS,False).sql new file mode 100644 index 00000000000..690628b5ae1 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SQLite.MS,False).sql @@ -0,0 +1,25 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT "p"."ProductID", "p"."CategoryID", "p"."Discontinued", "p"."IsDeleted", "p"."ProductName", "p"."QuantityPerUnit", "p"."ReorderLevel", "p"."SupplierID", "p"."UnitPrice", "p"."UnitsInStock", "p"."UnitsOnOrder" +FROM "Products" AS "p" +WHERE (@__ef_filter__p_0 OR NOT ("p"."IsDeleted") OR NOT ("p"."IsDeleted")) AND instr("p"."ProductName", 'a') > 0 + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT "p"."ProductID", "p"."CategoryID", "p"."Discontinued", "p"."IsDeleted", "p"."ProductName", "p"."QuantityPerUnit", "p"."ReorderLevel", "p"."SupplierID", "p"."UnitPrice", "p"."UnitsInStock", "p"."UnitsOnOrder" +FROM "Products" AS "p" +WHERE (@__ef_filter__p_0 OR NOT ("p"."IsDeleted") OR NOT ("p"."IsDeleted")) AND instr("p"."ProductName", 'a') > 0 + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT EXISTS ( + SELECT 1 + FROM "Products" AS "p" + WHERE (@__ef_filter__p_0 OR NOT ("p"."IsDeleted") OR NOT ("p"."IsDeleted")) AND instr("p"."ProductName", 'a') > 0) + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SQLite.MS,True).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SQLite.MS,True).sql new file mode 100644 index 00000000000..690628b5ae1 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SQLite.MS,True).sql @@ -0,0 +1,25 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT "p"."ProductID", "p"."CategoryID", "p"."Discontinued", "p"."IsDeleted", "p"."ProductName", "p"."QuantityPerUnit", "p"."ReorderLevel", "p"."SupplierID", "p"."UnitPrice", "p"."UnitsInStock", "p"."UnitsOnOrder" +FROM "Products" AS "p" +WHERE (@__ef_filter__p_0 OR NOT ("p"."IsDeleted") OR NOT ("p"."IsDeleted")) AND instr("p"."ProductName", 'a') > 0 + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT "p"."ProductID", "p"."CategoryID", "p"."Discontinued", "p"."IsDeleted", "p"."ProductName", "p"."QuantityPerUnit", "p"."ReorderLevel", "p"."SupplierID", "p"."UnitPrice", "p"."UnitsInStock", "p"."UnitsOnOrder" +FROM "Products" AS "p" +WHERE (@__ef_filter__p_0 OR NOT ("p"."IsDeleted") OR NOT ("p"."IsDeleted")) AND instr("p"."ProductName", 'a') > 0 + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT EXISTS ( + SELECT 1 + FROM "Products" AS "p" + WHERE (@__ef_filter__p_0 OR NOT ("p"."IsDeleted") OR NOT ("p"."IsDeleted")) AND instr("p"."ProductName", 'a') > 0) + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SQLite.MS,False).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SQLite.MS,False).sql new file mode 100644 index 00000000000..120766f8d74 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SQLite.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@p1='?' (DbType = Int32), @p2='?' (DbType = Int32), @p0='?' (DbType = Decimal) + +UPDATE "Order Details" SET "UnitPrice" = @p0 +WHERE "OrderID" = @p1 AND "ProductID" = @p2 +RETURNING 1; + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SQLite.MS,True).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SQLite.MS,True).sql new file mode 100644 index 00000000000..120766f8d74 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SQLite.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@p1='?' (DbType = Int32), @p2='?' (DbType = Int32), @p0='?' (DbType = Decimal) + +UPDATE "Order Details" SET "UnitPrice" = @p0 +WHERE "OrderID" = @p1 AND "ProductID" = @p2 +RETURNING 1; + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SQLite.MS,False).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SQLite.MS,False).sql new file mode 100644 index 00000000000..31c07a81632 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SQLite.MS,False).sql @@ -0,0 +1,24 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT "o"."OrderID", "o"."CustomerID", "o"."EmployeeID", "o"."Freight", "o"."IsDeleted", "o"."OrderDate", "o"."RequiredDate", "o"."ShipAddress", "o"."ShipCity", "o"."ShipCountry", "o"."ShipName", "o"."ShipPostalCode", "o"."ShipRegion", "o"."ShipVia", "o"."ShippedDate", "s"."OrderID", "s"."ProductID", "s"."Discount", "s"."IsDeleted", "s"."Quantity", "s"."UnitPrice", "s"."ProductID0", "s"."CategoryID", "s"."Discontinued", "s"."IsDeleted0", "s"."ProductName", "s"."QuantityPerUnit", "s"."ReorderLevel", "s"."SupplierID", "s"."UnitPrice0", "s"."UnitsInStock", "s"."UnitsOnOrder", "s"."OrderID0", "s"."ProductID1", "s"."Discount0", "s"."IsDeleted1", "s"."Quantity0", "s"."UnitPrice1" +FROM "Orders" AS "o" +LEFT JOIN ( + SELECT "o0"."OrderID", "o0"."ProductID", "o0"."Discount", "o0"."IsDeleted", "o0"."Quantity", "o0"."UnitPrice", "p0"."ProductID" AS "ProductID0", "p0"."CategoryID", "p0"."Discontinued", "p0"."IsDeleted" AS "IsDeleted0", "p0"."ProductName", "p0"."QuantityPerUnit", "p0"."ReorderLevel", "p0"."SupplierID", "p0"."UnitPrice" AS "UnitPrice0", "p0"."UnitsInStock", "p0"."UnitsOnOrder", "o2"."OrderID" AS "OrderID0", "o2"."ProductID" AS "ProductID1", "o2"."Discount" AS "Discount0", "o2"."IsDeleted" AS "IsDeleted1", "o2"."Quantity" AS "Quantity0", "o2"."UnitPrice" AS "UnitPrice1" + FROM "Order Details" AS "o0" + INNER JOIN ( + SELECT "p"."ProductID", "p"."CategoryID", "p"."Discontinued", "p"."IsDeleted", "p"."ProductName", "p"."QuantityPerUnit", "p"."ReorderLevel", "p"."SupplierID", "p"."UnitPrice", "p"."UnitsInStock", "p"."UnitsOnOrder" + FROM "Products" AS "p" + WHERE @__ef_filter__p_2 OR NOT ("p"."IsDeleted") OR NOT ("p"."IsDeleted") + ) AS "p0" ON "o0"."ProductID" = "p0"."ProductID" + LEFT JOIN ( + SELECT "o1"."OrderID", "o1"."ProductID", "o1"."Discount", "o1"."IsDeleted", "o1"."Quantity", "o1"."UnitPrice" + FROM "Order Details" AS "o1" + WHERE @__ef_filter__p_1 OR NOT ("o1"."IsDeleted") OR NOT ("o1"."IsDeleted") + ) AS "o2" ON "p0"."ProductID" = "o2"."ProductID" + WHERE @__ef_filter__p_1 OR NOT ("o0"."IsDeleted") OR NOT ("o0"."IsDeleted") +) AS "s" ON "o"."OrderID" = "s"."OrderID" +WHERE @__ef_filter__p_0 OR NOT ("o"."IsDeleted") OR NOT ("o"."IsDeleted") +ORDER BY "o"."OrderID", "s"."OrderID", "s"."ProductID", "s"."ProductID0", "s"."OrderID0" + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SQLite.MS,True).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SQLite.MS,True).sql new file mode 100644 index 00000000000..31c07a81632 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SQLite.MS,True).sql @@ -0,0 +1,24 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT "o"."OrderID", "o"."CustomerID", "o"."EmployeeID", "o"."Freight", "o"."IsDeleted", "o"."OrderDate", "o"."RequiredDate", "o"."ShipAddress", "o"."ShipCity", "o"."ShipCountry", "o"."ShipName", "o"."ShipPostalCode", "o"."ShipRegion", "o"."ShipVia", "o"."ShippedDate", "s"."OrderID", "s"."ProductID", "s"."Discount", "s"."IsDeleted", "s"."Quantity", "s"."UnitPrice", "s"."ProductID0", "s"."CategoryID", "s"."Discontinued", "s"."IsDeleted0", "s"."ProductName", "s"."QuantityPerUnit", "s"."ReorderLevel", "s"."SupplierID", "s"."UnitPrice0", "s"."UnitsInStock", "s"."UnitsOnOrder", "s"."OrderID0", "s"."ProductID1", "s"."Discount0", "s"."IsDeleted1", "s"."Quantity0", "s"."UnitPrice1" +FROM "Orders" AS "o" +LEFT JOIN ( + SELECT "o0"."OrderID", "o0"."ProductID", "o0"."Discount", "o0"."IsDeleted", "o0"."Quantity", "o0"."UnitPrice", "p0"."ProductID" AS "ProductID0", "p0"."CategoryID", "p0"."Discontinued", "p0"."IsDeleted" AS "IsDeleted0", "p0"."ProductName", "p0"."QuantityPerUnit", "p0"."ReorderLevel", "p0"."SupplierID", "p0"."UnitPrice" AS "UnitPrice0", "p0"."UnitsInStock", "p0"."UnitsOnOrder", "o2"."OrderID" AS "OrderID0", "o2"."ProductID" AS "ProductID1", "o2"."Discount" AS "Discount0", "o2"."IsDeleted" AS "IsDeleted1", "o2"."Quantity" AS "Quantity0", "o2"."UnitPrice" AS "UnitPrice1" + FROM "Order Details" AS "o0" + INNER JOIN ( + SELECT "p"."ProductID", "p"."CategoryID", "p"."Discontinued", "p"."IsDeleted", "p"."ProductName", "p"."QuantityPerUnit", "p"."ReorderLevel", "p"."SupplierID", "p"."UnitPrice", "p"."UnitsInStock", "p"."UnitsOnOrder" + FROM "Products" AS "p" + WHERE @__ef_filter__p_2 OR NOT ("p"."IsDeleted") OR NOT ("p"."IsDeleted") + ) AS "p0" ON "o0"."ProductID" = "p0"."ProductID" + LEFT JOIN ( + SELECT "o1"."OrderID", "o1"."ProductID", "o1"."Discount", "o1"."IsDeleted", "o1"."Quantity", "o1"."UnitPrice" + FROM "Order Details" AS "o1" + WHERE @__ef_filter__p_1 OR NOT ("o1"."IsDeleted") OR NOT ("o1"."IsDeleted") + ) AS "o2" ON "p0"."ProductID" = "o2"."ProductID" + WHERE @__ef_filter__p_1 OR NOT ("o0"."IsDeleted") OR NOT ("o0"."IsDeleted") +) AS "s" ON "o"."OrderID" = "s"."OrderID" +WHERE @__ef_filter__p_0 OR NOT ("o"."IsDeleted") OR NOT ("o"."IsDeleted") +ORDER BY "o"."OrderID", "s"."OrderID", "s"."ProductID", "s"."ProductID0", "s"."OrderID0" + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SQLite.MS,False).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SQLite.MS,False).sql new file mode 100644 index 00000000000..2eabc433ddd --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SQLite.MS,False).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT "e0"."EmployeeID", "e0"."Address", "e0"."BirthDate", "e0"."City", "e0"."Country", "e0"."Extension", "e0"."FirstName", "e0"."HireDate", "e0"."HomePhone", "e0"."IsDeleted", "e0"."LastName", "e0"."Notes", "e0"."Photo", "e0"."PhotoPath", "e0"."PostalCode", "e0"."Region", "e0"."ReportsTo", "e0"."Title", "e0"."TitleOfCourtesy", "o"."OrderID", "s"."EmployeeID", "s"."TerritoryID", "s"."IsDeleted", "s"."TerritoryID0", "s"."IsDeleted0", "s"."RegionID", "s"."TerritoryDescription", "s0"."OrderID", "s0"."ProductID", "s0"."Discount", "s0"."IsDeleted", "s0"."Quantity", "s0"."UnitPrice", "s0"."ProductID0", "s0"."CategoryID", "s0"."Discontinued", "s0"."IsDeleted0", "s0"."ProductName", "s0"."QuantityPerUnit", "s0"."ReorderLevel", "s0"."SupplierID", "s0"."UnitPrice0", "s0"."UnitsInStock", "s0"."UnitsOnOrder" +FROM "Orders" AS "o" +LEFT JOIN ( + SELECT "e"."EmployeeID", "e"."Address", "e"."BirthDate", "e"."City", "e"."Country", "e"."Extension", "e"."FirstName", "e"."HireDate", "e"."HomePhone", "e"."IsDeleted", "e"."LastName", "e"."Notes", "e"."Photo", "e"."PhotoPath", "e"."PostalCode", "e"."Region", "e"."ReportsTo", "e"."Title", "e"."TitleOfCourtesy" + FROM "Employees" AS "e" + WHERE @__ef_filter__p_1 OR NOT ("e"."IsDeleted") OR NOT ("e"."IsDeleted") +) AS "e0" ON "o"."EmployeeID" = "e0"."EmployeeID" +LEFT JOIN ( + SELECT "e1"."EmployeeID", "e1"."TerritoryID", "e1"."IsDeleted", "t0"."TerritoryID" AS "TerritoryID0", "t0"."IsDeleted" AS "IsDeleted0", "t0"."RegionID", "t0"."TerritoryDescription" + FROM "EmployeeTerritories" AS "e1" + INNER JOIN ( + SELECT "t"."TerritoryID", "t"."IsDeleted", "t"."RegionID", "t"."TerritoryDescription" + FROM "Territories" AS "t" + WHERE @__ef_filter__p_4 OR NOT ("t"."IsDeleted") OR NOT ("t"."IsDeleted") + ) AS "t0" ON "e1"."TerritoryID" = "t0"."TerritoryID" + WHERE @__ef_filter__p_2 OR NOT ("e1"."IsDeleted") OR NOT ("e1"."IsDeleted") +) AS "s" ON "e0"."EmployeeID" = "s"."EmployeeID" +LEFT JOIN ( + SELECT "o0"."OrderID", "o0"."ProductID", "o0"."Discount", "o0"."IsDeleted", "o0"."Quantity", "o0"."UnitPrice", "p0"."ProductID" AS "ProductID0", "p0"."CategoryID", "p0"."Discontinued", "p0"."IsDeleted" AS "IsDeleted0", "p0"."ProductName", "p0"."QuantityPerUnit", "p0"."ReorderLevel", "p0"."SupplierID", "p0"."UnitPrice" AS "UnitPrice0", "p0"."UnitsInStock", "p0"."UnitsOnOrder" + FROM "Order Details" AS "o0" + INNER JOIN ( + SELECT "p"."ProductID", "p"."CategoryID", "p"."Discontinued", "p"."IsDeleted", "p"."ProductName", "p"."QuantityPerUnit", "p"."ReorderLevel", "p"."SupplierID", "p"."UnitPrice", "p"."UnitsInStock", "p"."UnitsOnOrder" + FROM "Products" AS "p" + WHERE @__ef_filter__p_5 OR NOT ("p"."IsDeleted") OR NOT ("p"."IsDeleted") + ) AS "p0" ON "o0"."ProductID" = "p0"."ProductID" + WHERE @__ef_filter__p_3 OR NOT ("o0"."IsDeleted") OR NOT ("o0"."IsDeleted") +) AS "s0" ON "o"."OrderID" = "s0"."OrderID" +WHERE @__ef_filter__p_0 OR NOT ("o"."IsDeleted") OR NOT ("o"."IsDeleted") +ORDER BY "o"."OrderID", "e0"."EmployeeID", "s"."EmployeeID", "s"."TerritoryID", "s"."TerritoryID0", "s0"."OrderID", "s0"."ProductID" + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SQLite.MS,True).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SQLite.MS,True).sql new file mode 100644 index 00000000000..2eabc433ddd --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SQLite.MS,True).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT "e0"."EmployeeID", "e0"."Address", "e0"."BirthDate", "e0"."City", "e0"."Country", "e0"."Extension", "e0"."FirstName", "e0"."HireDate", "e0"."HomePhone", "e0"."IsDeleted", "e0"."LastName", "e0"."Notes", "e0"."Photo", "e0"."PhotoPath", "e0"."PostalCode", "e0"."Region", "e0"."ReportsTo", "e0"."Title", "e0"."TitleOfCourtesy", "o"."OrderID", "s"."EmployeeID", "s"."TerritoryID", "s"."IsDeleted", "s"."TerritoryID0", "s"."IsDeleted0", "s"."RegionID", "s"."TerritoryDescription", "s0"."OrderID", "s0"."ProductID", "s0"."Discount", "s0"."IsDeleted", "s0"."Quantity", "s0"."UnitPrice", "s0"."ProductID0", "s0"."CategoryID", "s0"."Discontinued", "s0"."IsDeleted0", "s0"."ProductName", "s0"."QuantityPerUnit", "s0"."ReorderLevel", "s0"."SupplierID", "s0"."UnitPrice0", "s0"."UnitsInStock", "s0"."UnitsOnOrder" +FROM "Orders" AS "o" +LEFT JOIN ( + SELECT "e"."EmployeeID", "e"."Address", "e"."BirthDate", "e"."City", "e"."Country", "e"."Extension", "e"."FirstName", "e"."HireDate", "e"."HomePhone", "e"."IsDeleted", "e"."LastName", "e"."Notes", "e"."Photo", "e"."PhotoPath", "e"."PostalCode", "e"."Region", "e"."ReportsTo", "e"."Title", "e"."TitleOfCourtesy" + FROM "Employees" AS "e" + WHERE @__ef_filter__p_1 OR NOT ("e"."IsDeleted") OR NOT ("e"."IsDeleted") +) AS "e0" ON "o"."EmployeeID" = "e0"."EmployeeID" +LEFT JOIN ( + SELECT "e1"."EmployeeID", "e1"."TerritoryID", "e1"."IsDeleted", "t0"."TerritoryID" AS "TerritoryID0", "t0"."IsDeleted" AS "IsDeleted0", "t0"."RegionID", "t0"."TerritoryDescription" + FROM "EmployeeTerritories" AS "e1" + INNER JOIN ( + SELECT "t"."TerritoryID", "t"."IsDeleted", "t"."RegionID", "t"."TerritoryDescription" + FROM "Territories" AS "t" + WHERE @__ef_filter__p_4 OR NOT ("t"."IsDeleted") OR NOT ("t"."IsDeleted") + ) AS "t0" ON "e1"."TerritoryID" = "t0"."TerritoryID" + WHERE @__ef_filter__p_2 OR NOT ("e1"."IsDeleted") OR NOT ("e1"."IsDeleted") +) AS "s" ON "e0"."EmployeeID" = "s"."EmployeeID" +LEFT JOIN ( + SELECT "o0"."OrderID", "o0"."ProductID", "o0"."Discount", "o0"."IsDeleted", "o0"."Quantity", "o0"."UnitPrice", "p0"."ProductID" AS "ProductID0", "p0"."CategoryID", "p0"."Discontinued", "p0"."IsDeleted" AS "IsDeleted0", "p0"."ProductName", "p0"."QuantityPerUnit", "p0"."ReorderLevel", "p0"."SupplierID", "p0"."UnitPrice" AS "UnitPrice0", "p0"."UnitsInStock", "p0"."UnitsOnOrder" + FROM "Order Details" AS "o0" + INNER JOIN ( + SELECT "p"."ProductID", "p"."CategoryID", "p"."Discontinued", "p"."IsDeleted", "p"."ProductName", "p"."QuantityPerUnit", "p"."ReorderLevel", "p"."SupplierID", "p"."UnitPrice", "p"."UnitsInStock", "p"."UnitsOnOrder" + FROM "Products" AS "p" + WHERE @__ef_filter__p_5 OR NOT ("p"."IsDeleted") OR NOT ("p"."IsDeleted") + ) AS "p0" ON "o0"."ProductID" = "p0"."ProductID" + WHERE @__ef_filter__p_3 OR NOT ("o0"."IsDeleted") OR NOT ("o0"."IsDeleted") +) AS "s0" ON "o"."OrderID" = "s0"."OrderID" +WHERE @__ef_filter__p_0 OR NOT ("o"."IsDeleted") OR NOT ("o"."IsDeleted") +ORDER BY "o"."OrderID", "e0"."EmployeeID", "s"."EmployeeID", "s"."TerritoryID", "s"."TerritoryID0", "s0"."OrderID", "s0"."ProductID" + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SQLite.MS,False).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SQLite.MS,False).sql new file mode 100644 index 00000000000..d53f5d8cfbd --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SQLite.MS,False).sql @@ -0,0 +1,13 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT "e"."EmployeeID", "e"."Address", "e"."BirthDate", "e"."City", "e"."Country", "e"."Extension", "e"."FirstName", "e"."HireDate", "e"."HomePhone", "e"."IsDeleted", "e"."LastName", "e"."Notes", "e"."Photo", "e"."PhotoPath", "e"."PostalCode", "e"."Region", "e"."ReportsTo", "e"."Title", "e"."TitleOfCourtesy", "e1"."EmployeeID", "e1"."Address", "e1"."BirthDate", "e1"."City", "e1"."Country", "e1"."Extension", "e1"."FirstName", "e1"."HireDate", "e1"."HomePhone", "e1"."IsDeleted", "e1"."LastName", "e1"."Notes", "e1"."Photo", "e1"."PhotoPath", "e1"."PostalCode", "e1"."Region", "e1"."ReportsTo", "e1"."Title", "e1"."TitleOfCourtesy" +FROM "Employees" AS "e" +LEFT JOIN ( + SELECT "e0"."EmployeeID", "e0"."Address", "e0"."BirthDate", "e0"."City", "e0"."Country", "e0"."Extension", "e0"."FirstName", "e0"."HireDate", "e0"."HomePhone", "e0"."IsDeleted", "e0"."LastName", "e0"."Notes", "e0"."Photo", "e0"."PhotoPath", "e0"."PostalCode", "e0"."Region", "e0"."ReportsTo", "e0"."Title", "e0"."TitleOfCourtesy" + FROM "Employees" AS "e0" + WHERE @__ef_filter__p_0 OR NOT ("e0"."IsDeleted") OR NOT ("e0"."IsDeleted") +) AS "e1" ON "e"."ReportsTo" = "e1"."EmployeeID" +WHERE @__ef_filter__p_0 OR NOT ("e"."IsDeleted") OR NOT ("e"."IsDeleted") + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SQLite.MS,True).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SQLite.MS,True).sql new file mode 100644 index 00000000000..d53f5d8cfbd --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SQLite.MS,True).sql @@ -0,0 +1,13 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT "e"."EmployeeID", "e"."Address", "e"."BirthDate", "e"."City", "e"."Country", "e"."Extension", "e"."FirstName", "e"."HireDate", "e"."HomePhone", "e"."IsDeleted", "e"."LastName", "e"."Notes", "e"."Photo", "e"."PhotoPath", "e"."PostalCode", "e"."Region", "e"."ReportsTo", "e"."Title", "e"."TitleOfCourtesy", "e1"."EmployeeID", "e1"."Address", "e1"."BirthDate", "e1"."City", "e1"."Country", "e1"."Extension", "e1"."FirstName", "e1"."HireDate", "e1"."HomePhone", "e1"."IsDeleted", "e1"."LastName", "e1"."Notes", "e1"."Photo", "e1"."PhotoPath", "e1"."PostalCode", "e1"."Region", "e1"."ReportsTo", "e1"."Title", "e1"."TitleOfCourtesy" +FROM "Employees" AS "e" +LEFT JOIN ( + SELECT "e0"."EmployeeID", "e0"."Address", "e0"."BirthDate", "e0"."City", "e0"."Country", "e0"."Extension", "e0"."FirstName", "e0"."HireDate", "e0"."HomePhone", "e0"."IsDeleted", "e0"."LastName", "e0"."Notes", "e0"."Photo", "e0"."PhotoPath", "e0"."PostalCode", "e0"."Region", "e0"."ReportsTo", "e0"."Title", "e0"."TitleOfCourtesy" + FROM "Employees" AS "e0" + WHERE @__ef_filter__p_0 OR NOT ("e0"."IsDeleted") OR NOT ("e0"."IsDeleted") +) AS "e1" ON "e"."ReportsTo" = "e1"."EmployeeID" +WHERE @__ef_filter__p_0 OR NOT ("e"."IsDeleted") OR NOT ("e"."IsDeleted") + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SQLite.MS,False).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SQLite.MS,False).sql new file mode 100644 index 00000000000..f953d7e1441 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SQLite.MS,False).sql @@ -0,0 +1,18 @@ +SELECT "p"."ProductID", "p"."CategoryID", "p"."Discontinued", "p"."IsDeleted", "p"."ProductName", "p"."QuantityPerUnit", "p"."ReorderLevel", "p"."SupplierID", "p"."UnitPrice", "p"."UnitsInStock", "p"."UnitsOnOrder", "o"."OrderID", "o"."ProductID", "o"."Discount", "o"."IsDeleted", "o"."Quantity", "o"."UnitPrice" +FROM "Products" AS "p" +INNER JOIN "Order Details" AS "o" ON "p"."ProductID" = "o"."ProductID" + + +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT "p"."ProductID", "p"."CategoryID", "p"."Discontinued", "p"."IsDeleted", "p"."ProductName", "p"."QuantityPerUnit", "p"."ReorderLevel", "p"."SupplierID", "p"."UnitPrice", "p"."UnitsInStock", "p"."UnitsOnOrder", "o0"."OrderID", "o0"."ProductID", "o0"."Discount", "o0"."IsDeleted", "o0"."Quantity", "o0"."UnitPrice" +FROM "Products" AS "p" +INNER JOIN ( + SELECT "o"."OrderID", "o"."ProductID", "o"."Discount", "o"."IsDeleted", "o"."Quantity", "o"."UnitPrice" + FROM "Order Details" AS "o" + WHERE @__ef_filter__p_1 OR NOT ("o"."IsDeleted") OR NOT ("o"."IsDeleted") +) AS "o0" ON "p"."ProductID" = "o0"."ProductID" +WHERE @__ef_filter__p_0 OR NOT ("p"."IsDeleted") OR NOT ("p"."IsDeleted") + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SQLite.MS,True).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SQLite.MS,True).sql new file mode 100644 index 00000000000..f953d7e1441 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SQLite.MS,True).sql @@ -0,0 +1,18 @@ +SELECT "p"."ProductID", "p"."CategoryID", "p"."Discontinued", "p"."IsDeleted", "p"."ProductName", "p"."QuantityPerUnit", "p"."ReorderLevel", "p"."SupplierID", "p"."UnitPrice", "p"."UnitsInStock", "p"."UnitsOnOrder", "o"."OrderID", "o"."ProductID", "o"."Discount", "o"."IsDeleted", "o"."Quantity", "o"."UnitPrice" +FROM "Products" AS "p" +INNER JOIN "Order Details" AS "o" ON "p"."ProductID" = "o"."ProductID" + + +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT "p"."ProductID", "p"."CategoryID", "p"."Discontinued", "p"."IsDeleted", "p"."ProductName", "p"."QuantityPerUnit", "p"."ReorderLevel", "p"."SupplierID", "p"."UnitPrice", "p"."UnitsInStock", "p"."UnitsOnOrder", "o0"."OrderID", "o0"."ProductID", "o0"."Discount", "o0"."IsDeleted", "o0"."Quantity", "o0"."UnitPrice" +FROM "Products" AS "p" +INNER JOIN ( + SELECT "o"."OrderID", "o"."ProductID", "o"."Discount", "o"."IsDeleted", "o"."Quantity", "o"."UnitPrice" + FROM "Order Details" AS "o" + WHERE @__ef_filter__p_1 OR NOT ("o"."IsDeleted") OR NOT ("o"."IsDeleted") +) AS "o0" ON "p"."ProductID" = "o0"."ProductID" +WHERE @__ef_filter__p_0 OR NOT ("p"."IsDeleted") OR NOT ("p"."IsDeleted") + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SQLite.MS,False).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SQLite.MS,False).sql new file mode 100644 index 00000000000..45ff1bc5553 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SQLite.MS,False).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT "o"."OrderID", "o"."CustomerID", "o"."EmployeeID", "o"."Freight", "o"."IsDeleted", "o"."OrderDate", "o"."RequiredDate", "o"."ShipAddress", "o"."ShipCity", "o"."ShipCountry", "o"."ShipName", "o"."ShipPostalCode", "o"."ShipRegion", "o"."ShipVia", "o"."ShippedDate", "e0"."EmployeeID", "e0"."Address", "e0"."BirthDate", "e0"."City", "e0"."Country", "e0"."Extension", "e0"."FirstName", "e0"."HireDate", "e0"."HomePhone", "e0"."IsDeleted", "e0"."LastName", "e0"."Notes", "e0"."Photo", "e0"."PhotoPath", "e0"."PostalCode", "e0"."Region", "e0"."ReportsTo", "e0"."Title", "e0"."TitleOfCourtesy", "s"."EmployeeID", "s"."TerritoryID", "s"."IsDeleted", "s"."TerritoryID0", "s"."IsDeleted0", "s"."RegionID", "s"."TerritoryDescription", "s0"."OrderID", "s0"."ProductID", "s0"."Discount", "s0"."IsDeleted", "s0"."Quantity", "s0"."UnitPrice", "s0"."ProductID0", "s0"."CategoryID", "s0"."Discontinued", "s0"."IsDeleted0", "s0"."ProductName", "s0"."QuantityPerUnit", "s0"."ReorderLevel", "s0"."SupplierID", "s0"."UnitPrice0", "s0"."UnitsInStock", "s0"."UnitsOnOrder" +FROM "Orders" AS "o" +LEFT JOIN ( + SELECT "e"."EmployeeID", "e"."Address", "e"."BirthDate", "e"."City", "e"."Country", "e"."Extension", "e"."FirstName", "e"."HireDate", "e"."HomePhone", "e"."IsDeleted", "e"."LastName", "e"."Notes", "e"."Photo", "e"."PhotoPath", "e"."PostalCode", "e"."Region", "e"."ReportsTo", "e"."Title", "e"."TitleOfCourtesy" + FROM "Employees" AS "e" + WHERE @__ef_filter__p_1 OR NOT ("e"."IsDeleted") OR NOT ("e"."IsDeleted") +) AS "e0" ON "o"."EmployeeID" = "e0"."EmployeeID" +LEFT JOIN ( + SELECT "e1"."EmployeeID", "e1"."TerritoryID", "e1"."IsDeleted", "t0"."TerritoryID" AS "TerritoryID0", "t0"."IsDeleted" AS "IsDeleted0", "t0"."RegionID", "t0"."TerritoryDescription" + FROM "EmployeeTerritories" AS "e1" + INNER JOIN ( + SELECT "t"."TerritoryID", "t"."IsDeleted", "t"."RegionID", "t"."TerritoryDescription" + FROM "Territories" AS "t" + WHERE @__ef_filter__p_4 OR NOT ("t"."IsDeleted") OR NOT ("t"."IsDeleted") + ) AS "t0" ON "e1"."TerritoryID" = "t0"."TerritoryID" + WHERE @__ef_filter__p_2 OR NOT ("e1"."IsDeleted") OR NOT ("e1"."IsDeleted") +) AS "s" ON "e0"."EmployeeID" = "s"."EmployeeID" +LEFT JOIN ( + SELECT "o0"."OrderID", "o0"."ProductID", "o0"."Discount", "o0"."IsDeleted", "o0"."Quantity", "o0"."UnitPrice", "p0"."ProductID" AS "ProductID0", "p0"."CategoryID", "p0"."Discontinued", "p0"."IsDeleted" AS "IsDeleted0", "p0"."ProductName", "p0"."QuantityPerUnit", "p0"."ReorderLevel", "p0"."SupplierID", "p0"."UnitPrice" AS "UnitPrice0", "p0"."UnitsInStock", "p0"."UnitsOnOrder" + FROM "Order Details" AS "o0" + INNER JOIN ( + SELECT "p"."ProductID", "p"."CategoryID", "p"."Discontinued", "p"."IsDeleted", "p"."ProductName", "p"."QuantityPerUnit", "p"."ReorderLevel", "p"."SupplierID", "p"."UnitPrice", "p"."UnitsInStock", "p"."UnitsOnOrder" + FROM "Products" AS "p" + WHERE @__ef_filter__p_5 OR NOT ("p"."IsDeleted") OR NOT ("p"."IsDeleted") + ) AS "p0" ON "o0"."ProductID" = "p0"."ProductID" + WHERE @__ef_filter__p_3 OR NOT ("o0"."IsDeleted") OR NOT ("o0"."IsDeleted") +) AS "s0" ON "o"."OrderID" = "s0"."OrderID" +WHERE @__ef_filter__p_0 OR NOT ("o"."IsDeleted") OR NOT ("o"."IsDeleted") +ORDER BY "o"."OrderID", "e0"."EmployeeID", "s"."EmployeeID", "s"."TerritoryID", "s"."TerritoryID0", "s0"."OrderID", "s0"."ProductID" + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SQLite.MS,True).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SQLite.MS,True).sql new file mode 100644 index 00000000000..45ff1bc5553 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SQLite.MS,True).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT "o"."OrderID", "o"."CustomerID", "o"."EmployeeID", "o"."Freight", "o"."IsDeleted", "o"."OrderDate", "o"."RequiredDate", "o"."ShipAddress", "o"."ShipCity", "o"."ShipCountry", "o"."ShipName", "o"."ShipPostalCode", "o"."ShipRegion", "o"."ShipVia", "o"."ShippedDate", "e0"."EmployeeID", "e0"."Address", "e0"."BirthDate", "e0"."City", "e0"."Country", "e0"."Extension", "e0"."FirstName", "e0"."HireDate", "e0"."HomePhone", "e0"."IsDeleted", "e0"."LastName", "e0"."Notes", "e0"."Photo", "e0"."PhotoPath", "e0"."PostalCode", "e0"."Region", "e0"."ReportsTo", "e0"."Title", "e0"."TitleOfCourtesy", "s"."EmployeeID", "s"."TerritoryID", "s"."IsDeleted", "s"."TerritoryID0", "s"."IsDeleted0", "s"."RegionID", "s"."TerritoryDescription", "s0"."OrderID", "s0"."ProductID", "s0"."Discount", "s0"."IsDeleted", "s0"."Quantity", "s0"."UnitPrice", "s0"."ProductID0", "s0"."CategoryID", "s0"."Discontinued", "s0"."IsDeleted0", "s0"."ProductName", "s0"."QuantityPerUnit", "s0"."ReorderLevel", "s0"."SupplierID", "s0"."UnitPrice0", "s0"."UnitsInStock", "s0"."UnitsOnOrder" +FROM "Orders" AS "o" +LEFT JOIN ( + SELECT "e"."EmployeeID", "e"."Address", "e"."BirthDate", "e"."City", "e"."Country", "e"."Extension", "e"."FirstName", "e"."HireDate", "e"."HomePhone", "e"."IsDeleted", "e"."LastName", "e"."Notes", "e"."Photo", "e"."PhotoPath", "e"."PostalCode", "e"."Region", "e"."ReportsTo", "e"."Title", "e"."TitleOfCourtesy" + FROM "Employees" AS "e" + WHERE @__ef_filter__p_1 OR NOT ("e"."IsDeleted") OR NOT ("e"."IsDeleted") +) AS "e0" ON "o"."EmployeeID" = "e0"."EmployeeID" +LEFT JOIN ( + SELECT "e1"."EmployeeID", "e1"."TerritoryID", "e1"."IsDeleted", "t0"."TerritoryID" AS "TerritoryID0", "t0"."IsDeleted" AS "IsDeleted0", "t0"."RegionID", "t0"."TerritoryDescription" + FROM "EmployeeTerritories" AS "e1" + INNER JOIN ( + SELECT "t"."TerritoryID", "t"."IsDeleted", "t"."RegionID", "t"."TerritoryDescription" + FROM "Territories" AS "t" + WHERE @__ef_filter__p_4 OR NOT ("t"."IsDeleted") OR NOT ("t"."IsDeleted") + ) AS "t0" ON "e1"."TerritoryID" = "t0"."TerritoryID" + WHERE @__ef_filter__p_2 OR NOT ("e1"."IsDeleted") OR NOT ("e1"."IsDeleted") +) AS "s" ON "e0"."EmployeeID" = "s"."EmployeeID" +LEFT JOIN ( + SELECT "o0"."OrderID", "o0"."ProductID", "o0"."Discount", "o0"."IsDeleted", "o0"."Quantity", "o0"."UnitPrice", "p0"."ProductID" AS "ProductID0", "p0"."CategoryID", "p0"."Discontinued", "p0"."IsDeleted" AS "IsDeleted0", "p0"."ProductName", "p0"."QuantityPerUnit", "p0"."ReorderLevel", "p0"."SupplierID", "p0"."UnitPrice" AS "UnitPrice0", "p0"."UnitsInStock", "p0"."UnitsOnOrder" + FROM "Order Details" AS "o0" + INNER JOIN ( + SELECT "p"."ProductID", "p"."CategoryID", "p"."Discontinued", "p"."IsDeleted", "p"."ProductName", "p"."QuantityPerUnit", "p"."ReorderLevel", "p"."SupplierID", "p"."UnitPrice", "p"."UnitsInStock", "p"."UnitsOnOrder" + FROM "Products" AS "p" + WHERE @__ef_filter__p_5 OR NOT ("p"."IsDeleted") OR NOT ("p"."IsDeleted") + ) AS "p0" ON "o0"."ProductID" = "p0"."ProductID" + WHERE @__ef_filter__p_3 OR NOT ("o0"."IsDeleted") OR NOT ("o0"."IsDeleted") +) AS "s0" ON "o"."OrderID" = "s0"."OrderID" +WHERE @__ef_filter__p_0 OR NOT ("o"."IsDeleted") OR NOT ("o"."IsDeleted") +ORDER BY "o"."OrderID", "e0"."EmployeeID", "s"."EmployeeID", "s"."TerritoryID", "s"."TerritoryID0", "s0"."OrderID", "s0"."ProductID" + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SQLite.MS,False).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SQLite.MS,False).sql new file mode 100644 index 00000000000..22f387e7b45 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SQLite.MS,False).sql @@ -0,0 +1,29 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT "o"."OrderID", "o"."CustomerID", "o"."EmployeeID", "o"."Freight", "o"."IsDeleted", "o"."OrderDate", "o"."RequiredDate", "o"."ShipAddress", "o"."ShipCity", "o"."ShipCountry", "o"."ShipName", "o"."ShipPostalCode", "o"."ShipRegion", "o"."ShipVia", "o"."ShippedDate", "e0"."EmployeeID", "e0"."Address", "e0"."BirthDate", "e0"."City", "e0"."Country", "e0"."Extension", "e0"."FirstName", "e0"."HireDate", "e0"."HomePhone", "e0"."IsDeleted", "e0"."LastName", "e0"."Notes", "e0"."Photo", "e0"."PhotoPath", "e0"."PostalCode", "e0"."Region", "e0"."ReportsTo", "e0"."Title", "e0"."TitleOfCourtesy", "e2"."EmployeeID", "e2"."TerritoryID", "e2"."IsDeleted", "s"."OrderID", "s"."ProductID", "s"."Discount", "s"."IsDeleted", "s"."Quantity", "s"."UnitPrice", "s"."ProductID0", "s"."CategoryID", "s"."Discontinued", "s"."IsDeleted0", "s"."ProductName", "s"."QuantityPerUnit", "s"."ReorderLevel", "s"."SupplierID", "s"."UnitPrice0", "s"."UnitsInStock", "s"."UnitsOnOrder" +FROM "Orders" AS "o" +LEFT JOIN ( + SELECT "e"."EmployeeID", "e"."Address", "e"."BirthDate", "e"."City", "e"."Country", "e"."Extension", "e"."FirstName", "e"."HireDate", "e"."HomePhone", "e"."IsDeleted", "e"."LastName", "e"."Notes", "e"."Photo", "e"."PhotoPath", "e"."PostalCode", "e"."Region", "e"."ReportsTo", "e"."Title", "e"."TitleOfCourtesy" + FROM "Employees" AS "e" + WHERE @__ef_filter__p_1 OR NOT ("e"."IsDeleted") OR NOT ("e"."IsDeleted") +) AS "e0" ON "o"."EmployeeID" = "e0"."EmployeeID" +LEFT JOIN ( + SELECT "e1"."EmployeeID", "e1"."TerritoryID", "e1"."IsDeleted" + FROM "EmployeeTerritories" AS "e1" + WHERE @__ef_filter__p_2 OR NOT ("e1"."IsDeleted") OR NOT ("e1"."IsDeleted") +) AS "e2" ON "e0"."EmployeeID" = "e2"."EmployeeID" +LEFT JOIN ( + SELECT "o0"."OrderID", "o0"."ProductID", "o0"."Discount", "o0"."IsDeleted", "o0"."Quantity", "o0"."UnitPrice", "p0"."ProductID" AS "ProductID0", "p0"."CategoryID", "p0"."Discontinued", "p0"."IsDeleted" AS "IsDeleted0", "p0"."ProductName", "p0"."QuantityPerUnit", "p0"."ReorderLevel", "p0"."SupplierID", "p0"."UnitPrice" AS "UnitPrice0", "p0"."UnitsInStock", "p0"."UnitsOnOrder" + FROM "Order Details" AS "o0" + INNER JOIN ( + SELECT "p"."ProductID", "p"."CategoryID", "p"."Discontinued", "p"."IsDeleted", "p"."ProductName", "p"."QuantityPerUnit", "p"."ReorderLevel", "p"."SupplierID", "p"."UnitPrice", "p"."UnitsInStock", "p"."UnitsOnOrder" + FROM "Products" AS "p" + WHERE @__ef_filter__p_4 OR NOT ("p"."IsDeleted") OR NOT ("p"."IsDeleted") + ) AS "p0" ON "o0"."ProductID" = "p0"."ProductID" + WHERE @__ef_filter__p_3 OR NOT ("o0"."IsDeleted") OR NOT ("o0"."IsDeleted") +) AS "s" ON "o"."OrderID" = "s"."OrderID" +WHERE @__ef_filter__p_0 OR NOT ("o"."IsDeleted") OR NOT ("o"."IsDeleted") +ORDER BY "o"."OrderID", "e0"."EmployeeID", "e2"."EmployeeID", "e2"."TerritoryID", "s"."OrderID", "s"."ProductID" + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SQLite.MS,True).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SQLite.MS,True).sql new file mode 100644 index 00000000000..22f387e7b45 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SQLite.MS,True).sql @@ -0,0 +1,29 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT "o"."OrderID", "o"."CustomerID", "o"."EmployeeID", "o"."Freight", "o"."IsDeleted", "o"."OrderDate", "o"."RequiredDate", "o"."ShipAddress", "o"."ShipCity", "o"."ShipCountry", "o"."ShipName", "o"."ShipPostalCode", "o"."ShipRegion", "o"."ShipVia", "o"."ShippedDate", "e0"."EmployeeID", "e0"."Address", "e0"."BirthDate", "e0"."City", "e0"."Country", "e0"."Extension", "e0"."FirstName", "e0"."HireDate", "e0"."HomePhone", "e0"."IsDeleted", "e0"."LastName", "e0"."Notes", "e0"."Photo", "e0"."PhotoPath", "e0"."PostalCode", "e0"."Region", "e0"."ReportsTo", "e0"."Title", "e0"."TitleOfCourtesy", "e2"."EmployeeID", "e2"."TerritoryID", "e2"."IsDeleted", "s"."OrderID", "s"."ProductID", "s"."Discount", "s"."IsDeleted", "s"."Quantity", "s"."UnitPrice", "s"."ProductID0", "s"."CategoryID", "s"."Discontinued", "s"."IsDeleted0", "s"."ProductName", "s"."QuantityPerUnit", "s"."ReorderLevel", "s"."SupplierID", "s"."UnitPrice0", "s"."UnitsInStock", "s"."UnitsOnOrder" +FROM "Orders" AS "o" +LEFT JOIN ( + SELECT "e"."EmployeeID", "e"."Address", "e"."BirthDate", "e"."City", "e"."Country", "e"."Extension", "e"."FirstName", "e"."HireDate", "e"."HomePhone", "e"."IsDeleted", "e"."LastName", "e"."Notes", "e"."Photo", "e"."PhotoPath", "e"."PostalCode", "e"."Region", "e"."ReportsTo", "e"."Title", "e"."TitleOfCourtesy" + FROM "Employees" AS "e" + WHERE @__ef_filter__p_1 OR NOT ("e"."IsDeleted") OR NOT ("e"."IsDeleted") +) AS "e0" ON "o"."EmployeeID" = "e0"."EmployeeID" +LEFT JOIN ( + SELECT "e1"."EmployeeID", "e1"."TerritoryID", "e1"."IsDeleted" + FROM "EmployeeTerritories" AS "e1" + WHERE @__ef_filter__p_2 OR NOT ("e1"."IsDeleted") OR NOT ("e1"."IsDeleted") +) AS "e2" ON "e0"."EmployeeID" = "e2"."EmployeeID" +LEFT JOIN ( + SELECT "o0"."OrderID", "o0"."ProductID", "o0"."Discount", "o0"."IsDeleted", "o0"."Quantity", "o0"."UnitPrice", "p0"."ProductID" AS "ProductID0", "p0"."CategoryID", "p0"."Discontinued", "p0"."IsDeleted" AS "IsDeleted0", "p0"."ProductName", "p0"."QuantityPerUnit", "p0"."ReorderLevel", "p0"."SupplierID", "p0"."UnitPrice" AS "UnitPrice0", "p0"."UnitsInStock", "p0"."UnitsOnOrder" + FROM "Order Details" AS "o0" + INNER JOIN ( + SELECT "p"."ProductID", "p"."CategoryID", "p"."Discontinued", "p"."IsDeleted", "p"."ProductName", "p"."QuantityPerUnit", "p"."ReorderLevel", "p"."SupplierID", "p"."UnitPrice", "p"."UnitsInStock", "p"."UnitsOnOrder" + FROM "Products" AS "p" + WHERE @__ef_filter__p_4 OR NOT ("p"."IsDeleted") OR NOT ("p"."IsDeleted") + ) AS "p0" ON "o0"."ProductID" = "p0"."ProductID" + WHERE @__ef_filter__p_3 OR NOT ("o0"."IsDeleted") OR NOT ("o0"."IsDeleted") +) AS "s" ON "o"."OrderID" = "s"."OrderID" +WHERE @__ef_filter__p_0 OR NOT ("o"."IsDeleted") OR NOT ("o"."IsDeleted") +ORDER BY "o"."OrderID", "e0"."EmployeeID", "e2"."EmployeeID", "e2"."TerritoryID", "s"."OrderID", "s"."ProductID" + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SQLite.MS,False).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SQLite.MS,False).sql new file mode 100644 index 00000000000..b90cd2a591c --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SQLite.MS,False).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT "p"."ProductName", "p"."ProductID", "s1"."Discount", "s1"."OrderID", "s1"."CustomerID", "s1"."EmployeeID", "s1"."Freight", "s1"."IsDeleted", "s1"."OrderDate", "s1"."RequiredDate", "s1"."ShipAddress", "s1"."ShipCity", "s1"."ShipCountry", "s1"."ShipName", "s1"."ShipPostalCode", "s1"."ShipRegion", "s1"."ShipVia", "s1"."ShippedDate", "s1"."OrderID0", "s1"."ProductID", "s1"."ProductID0", "s1"."SupplierID", "s1"."ProductID1", "s1"."CategoryID", "s1"."Discontinued", "s1"."IsDeleted0", "s1"."ProductName", "s1"."QuantityPerUnit", "s1"."ReorderLevel", "s1"."SupplierID0", "s1"."UnitPrice", "s1"."UnitsInStock", "s1"."UnitsOnOrder" +FROM "Products" AS "p" +LEFT JOIN ( + SELECT "o"."Discount", "o1"."OrderID", "o1"."CustomerID", "o1"."EmployeeID", "o1"."Freight", "o1"."IsDeleted", "o1"."OrderDate", "o1"."RequiredDate", "o1"."ShipAddress", "o1"."ShipCity", "o1"."ShipCountry", "o1"."ShipName", "o1"."ShipPostalCode", "o1"."ShipRegion", "o1"."ShipVia", "o1"."ShippedDate", "o"."OrderID" AS "OrderID0", "o"."ProductID", "p1"."ProductID" AS "ProductID0", "s0"."SupplierID", "p3"."ProductID" AS "ProductID1", "p3"."CategoryID", "p3"."Discontinued", "p3"."IsDeleted" AS "IsDeleted0", "p3"."ProductName", "p3"."QuantityPerUnit", "p3"."ReorderLevel", "p3"."SupplierID" AS "SupplierID0", "p3"."UnitPrice", "p3"."UnitsInStock", "p3"."UnitsOnOrder" + FROM "Order Details" AS "o" + INNER JOIN ( + SELECT "o0"."OrderID", "o0"."CustomerID", "o0"."EmployeeID", "o0"."Freight", "o0"."IsDeleted", "o0"."OrderDate", "o0"."RequiredDate", "o0"."ShipAddress", "o0"."ShipCity", "o0"."ShipCountry", "o0"."ShipName", "o0"."ShipPostalCode", "o0"."ShipRegion", "o0"."ShipVia", "o0"."ShippedDate" + FROM "Orders" AS "o0" + WHERE @__ef_filter__p_2 OR NOT ("o0"."IsDeleted") OR NOT ("o0"."IsDeleted") + ) AS "o1" ON "o"."OrderID" = "o1"."OrderID" + INNER JOIN ( + SELECT "p0"."ProductID", "p0"."SupplierID" + FROM "Products" AS "p0" + WHERE @__ef_filter__p_0 OR NOT ("p0"."IsDeleted") OR NOT ("p0"."IsDeleted") + ) AS "p1" ON "o"."ProductID" = "p1"."ProductID" + LEFT JOIN ( + SELECT "s"."SupplierID" + FROM "Suppliers" AS "s" + WHERE @__ef_filter__p_3 OR NOT ("s"."IsDeleted") OR NOT ("s"."IsDeleted") + ) AS "s0" ON "p1"."SupplierID" = "s0"."SupplierID" + LEFT JOIN ( + SELECT "p2"."ProductID", "p2"."CategoryID", "p2"."Discontinued", "p2"."IsDeleted", "p2"."ProductName", "p2"."QuantityPerUnit", "p2"."ReorderLevel", "p2"."SupplierID", "p2"."UnitPrice", "p2"."UnitsInStock", "p2"."UnitsOnOrder" + FROM "Products" AS "p2" + WHERE @__ef_filter__p_0 OR NOT ("p2"."IsDeleted") OR NOT ("p2"."IsDeleted") + ) AS "p3" ON "s0"."SupplierID" = "p3"."SupplierID" + WHERE @__ef_filter__p_1 OR NOT ("o"."IsDeleted") OR NOT ("o"."IsDeleted") +) AS "s1" ON "p"."ProductID" = "s1"."ProductID" +WHERE @__ef_filter__p_0 OR NOT ("p"."IsDeleted") OR NOT ("p"."IsDeleted") +ORDER BY "p"."ProductID", "s1"."OrderID0", "s1"."ProductID", "s1"."OrderID", "s1"."ProductID0", "s1"."SupplierID" + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SQLite.MS,True).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SQLite.MS,True).sql new file mode 100644 index 00000000000..b90cd2a591c --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SQLite.MS,True).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT "p"."ProductName", "p"."ProductID", "s1"."Discount", "s1"."OrderID", "s1"."CustomerID", "s1"."EmployeeID", "s1"."Freight", "s1"."IsDeleted", "s1"."OrderDate", "s1"."RequiredDate", "s1"."ShipAddress", "s1"."ShipCity", "s1"."ShipCountry", "s1"."ShipName", "s1"."ShipPostalCode", "s1"."ShipRegion", "s1"."ShipVia", "s1"."ShippedDate", "s1"."OrderID0", "s1"."ProductID", "s1"."ProductID0", "s1"."SupplierID", "s1"."ProductID1", "s1"."CategoryID", "s1"."Discontinued", "s1"."IsDeleted0", "s1"."ProductName", "s1"."QuantityPerUnit", "s1"."ReorderLevel", "s1"."SupplierID0", "s1"."UnitPrice", "s1"."UnitsInStock", "s1"."UnitsOnOrder" +FROM "Products" AS "p" +LEFT JOIN ( + SELECT "o"."Discount", "o1"."OrderID", "o1"."CustomerID", "o1"."EmployeeID", "o1"."Freight", "o1"."IsDeleted", "o1"."OrderDate", "o1"."RequiredDate", "o1"."ShipAddress", "o1"."ShipCity", "o1"."ShipCountry", "o1"."ShipName", "o1"."ShipPostalCode", "o1"."ShipRegion", "o1"."ShipVia", "o1"."ShippedDate", "o"."OrderID" AS "OrderID0", "o"."ProductID", "p1"."ProductID" AS "ProductID0", "s0"."SupplierID", "p3"."ProductID" AS "ProductID1", "p3"."CategoryID", "p3"."Discontinued", "p3"."IsDeleted" AS "IsDeleted0", "p3"."ProductName", "p3"."QuantityPerUnit", "p3"."ReorderLevel", "p3"."SupplierID" AS "SupplierID0", "p3"."UnitPrice", "p3"."UnitsInStock", "p3"."UnitsOnOrder" + FROM "Order Details" AS "o" + INNER JOIN ( + SELECT "o0"."OrderID", "o0"."CustomerID", "o0"."EmployeeID", "o0"."Freight", "o0"."IsDeleted", "o0"."OrderDate", "o0"."RequiredDate", "o0"."ShipAddress", "o0"."ShipCity", "o0"."ShipCountry", "o0"."ShipName", "o0"."ShipPostalCode", "o0"."ShipRegion", "o0"."ShipVia", "o0"."ShippedDate" + FROM "Orders" AS "o0" + WHERE @__ef_filter__p_2 OR NOT ("o0"."IsDeleted") OR NOT ("o0"."IsDeleted") + ) AS "o1" ON "o"."OrderID" = "o1"."OrderID" + INNER JOIN ( + SELECT "p0"."ProductID", "p0"."SupplierID" + FROM "Products" AS "p0" + WHERE @__ef_filter__p_0 OR NOT ("p0"."IsDeleted") OR NOT ("p0"."IsDeleted") + ) AS "p1" ON "o"."ProductID" = "p1"."ProductID" + LEFT JOIN ( + SELECT "s"."SupplierID" + FROM "Suppliers" AS "s" + WHERE @__ef_filter__p_3 OR NOT ("s"."IsDeleted") OR NOT ("s"."IsDeleted") + ) AS "s0" ON "p1"."SupplierID" = "s0"."SupplierID" + LEFT JOIN ( + SELECT "p2"."ProductID", "p2"."CategoryID", "p2"."Discontinued", "p2"."IsDeleted", "p2"."ProductName", "p2"."QuantityPerUnit", "p2"."ReorderLevel", "p2"."SupplierID", "p2"."UnitPrice", "p2"."UnitsInStock", "p2"."UnitsOnOrder" + FROM "Products" AS "p2" + WHERE @__ef_filter__p_0 OR NOT ("p2"."IsDeleted") OR NOT ("p2"."IsDeleted") + ) AS "p3" ON "s0"."SupplierID" = "p3"."SupplierID" + WHERE @__ef_filter__p_1 OR NOT ("o"."IsDeleted") OR NOT ("o"."IsDeleted") +) AS "s1" ON "p"."ProductID" = "s1"."ProductID" +WHERE @__ef_filter__p_0 OR NOT ("p"."IsDeleted") OR NOT ("p"."IsDeleted") +ORDER BY "p"."ProductID", "s1"."OrderID0", "s1"."ProductID", "s1"."OrderID", "s1"."ProductID0", "s1"."SupplierID" + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SQLite.MS,False).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SQLite.MS,False).sql new file mode 100644 index 00000000000..d30f2869cb0 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SQLite.MS,False).sql @@ -0,0 +1,20 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT "p"."ProductID", "p"."CategoryID", "p"."Discontinued", "p"."IsDeleted", "p"."ProductName", "p"."QuantityPerUnit", "p"."ReorderLevel", "p"."SupplierID", "p"."UnitPrice", "p"."UnitsInStock", "p"."UnitsOnOrder", "p1"."ProductID", "p1"."CategoryID", "p1"."Discontinued", "p1"."IsDeleted", "p1"."ProductName", "p1"."QuantityPerUnit", "p1"."ReorderLevel", "p1"."SupplierID", "p1"."UnitPrice", "p1"."UnitsInStock", "p1"."UnitsOnOrder" +FROM "Products" AS "p" +CROSS JOIN ( + SELECT "p0"."ProductID", "p0"."CategoryID", "p0"."Discontinued", "p0"."IsDeleted", "p0"."ProductName", "p0"."QuantityPerUnit", "p0"."ReorderLevel", "p0"."SupplierID", "p0"."UnitPrice", "p0"."UnitsInStock", "p0"."UnitsOnOrder" + FROM "Products" AS "p0" + WHERE (@__ef_filter__p_0 OR NOT ("p0"."IsDeleted") OR NOT ("p0"."IsDeleted")) AND ( + SELECT COUNT(*) + FROM "Order Details" AS "o0" + WHERE (@__ef_filter__p_1 OR NOT ("o0"."IsDeleted") OR NOT ("o0"."IsDeleted")) AND "p0"."ProductID" = "o0"."ProductID") > 0 +) AS "p1" +WHERE (@__ef_filter__p_0 OR NOT ("p"."IsDeleted") OR NOT ("p"."IsDeleted")) AND ( + SELECT COUNT(*) + FROM "Order Details" AS "o" + WHERE (@__ef_filter__p_1 OR NOT ("o"."IsDeleted") OR NOT ("o"."IsDeleted")) AND "p"."ProductID" = "o"."ProductID") > 0 AND "p"."ProductID" = "p1"."ProductID" +ORDER BY "p"."ProductID" + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SQLite.MS,True).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SQLite.MS,True).sql new file mode 100644 index 00000000000..d30f2869cb0 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SQLite.MS,True).sql @@ -0,0 +1,20 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT "p"."ProductID", "p"."CategoryID", "p"."Discontinued", "p"."IsDeleted", "p"."ProductName", "p"."QuantityPerUnit", "p"."ReorderLevel", "p"."SupplierID", "p"."UnitPrice", "p"."UnitsInStock", "p"."UnitsOnOrder", "p1"."ProductID", "p1"."CategoryID", "p1"."Discontinued", "p1"."IsDeleted", "p1"."ProductName", "p1"."QuantityPerUnit", "p1"."ReorderLevel", "p1"."SupplierID", "p1"."UnitPrice", "p1"."UnitsInStock", "p1"."UnitsOnOrder" +FROM "Products" AS "p" +CROSS JOIN ( + SELECT "p0"."ProductID", "p0"."CategoryID", "p0"."Discontinued", "p0"."IsDeleted", "p0"."ProductName", "p0"."QuantityPerUnit", "p0"."ReorderLevel", "p0"."SupplierID", "p0"."UnitPrice", "p0"."UnitsInStock", "p0"."UnitsOnOrder" + FROM "Products" AS "p0" + WHERE (@__ef_filter__p_0 OR NOT ("p0"."IsDeleted") OR NOT ("p0"."IsDeleted")) AND ( + SELECT COUNT(*) + FROM "Order Details" AS "o0" + WHERE (@__ef_filter__p_1 OR NOT ("o0"."IsDeleted") OR NOT ("o0"."IsDeleted")) AND "p0"."ProductID" = "o0"."ProductID") > 0 +) AS "p1" +WHERE (@__ef_filter__p_0 OR NOT ("p"."IsDeleted") OR NOT ("p"."IsDeleted")) AND ( + SELECT COUNT(*) + FROM "Order Details" AS "o" + WHERE (@__ef_filter__p_1 OR NOT ("o"."IsDeleted") OR NOT ("o"."IsDeleted")) AND "p"."ProductID" = "o"."ProductID") > 0 AND "p"."ProductID" = "p1"."ProductID" +ORDER BY "p"."ProductID" + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SQLite.MS,False).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SQLite.MS,False).sql new file mode 100644 index 00000000000..ec48cc67c09 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SQLite.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__test_0='?' (DbType = Int32) + +SELECT "e"."EmployeeID", "e"."Address", "e"."BirthDate", "e"."City", "e"."Country", "e"."Extension", "e"."FirstName", "e"."HireDate", "e"."HomePhone", "e"."IsDeleted", "e"."LastName", "e"."Notes", "e"."Photo", "e"."PhotoPath", "e"."PostalCode", "e"."Region", "e"."ReportsTo", "e"."Title", "e"."TitleOfCourtesy" +FROM "Employees" AS "e" +WHERE (@__ef_filter__p_0 OR NOT ("e"."IsDeleted") OR NOT ("e"."IsDeleted")) AND "e"."EmployeeID" = @__test_0 + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SQLite.MS,True).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SQLite.MS,True).sql new file mode 100644 index 00000000000..ec48cc67c09 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SQLite.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__test_0='?' (DbType = Int32) + +SELECT "e"."EmployeeID", "e"."Address", "e"."BirthDate", "e"."City", "e"."Country", "e"."Extension", "e"."FirstName", "e"."HireDate", "e"."HomePhone", "e"."IsDeleted", "e"."LastName", "e"."Notes", "e"."Photo", "e"."PhotoPath", "e"."PostalCode", "e"."Region", "e"."ReportsTo", "e"."Title", "e"."TitleOfCourtesy" +FROM "Employees" AS "e" +WHERE (@__ef_filter__p_0 OR NOT ("e"."IsDeleted") OR NOT ("e"."IsDeleted")) AND "e"."EmployeeID" = @__test_0 + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SQLite.MS,False).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SQLite.MS,False).sql new file mode 100644 index 00000000000..4595d11eedf --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SQLite.MS,False).sql @@ -0,0 +1,9 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT "c"."CustomerID", "c"."Address", "c"."City", "c"."CompanyName", "c"."ContactName", "c"."ContactTitle", "c"."Country", "c"."Fax", "c"."IsDeleted", "c"."Phone", "c"."PostalCode", "c"."Region" +FROM "Customers" AS "c" +WHERE @__ef_filter__p_0 OR NOT ("c"."IsDeleted") OR NOT ("c"."IsDeleted") +LIMIT 1 + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SQLite.MS,True).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SQLite.MS,True).sql new file mode 100644 index 00000000000..4595d11eedf --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SQLite.MS,True).sql @@ -0,0 +1,9 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT "c"."CustomerID", "c"."Address", "c"."City", "c"."CompanyName", "c"."ContactName", "c"."ContactTitle", "c"."Country", "c"."Fax", "c"."IsDeleted", "c"."Phone", "c"."PostalCode", "c"."Region" +FROM "Customers" AS "c" +WHERE @__ef_filter__p_0 OR NOT ("c"."IsDeleted") OR NOT ("c"."IsDeleted") +LIMIT 1 + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SQLite.MS,False).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SQLite.MS,False).sql new file mode 100644 index 00000000000..5a69987404f --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SQLite.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT "p"."QuantityPerUnit" AS "Quantity" +FROM "Products" AS "p" +WHERE @__ef_filter__p_0 OR NOT ("p"."IsDeleted") OR NOT ("p"."IsDeleted") + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SQLite.MS,True).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SQLite.MS,True).sql new file mode 100644 index 00000000000..5a69987404f --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SQLite.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT "p"."QuantityPerUnit" AS "Quantity" +FROM "Products" AS "p" +WHERE @__ef_filter__p_0 OR NOT ("p"."IsDeleted") OR NOT ("p"."IsDeleted") + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SQLite.MS,False).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SQLite.MS,False).sql new file mode 100644 index 00000000000..4efb4d9b4ae --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SQLite.MS,False).sql @@ -0,0 +1,15 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +-- Tagged query + +SELECT "e"."EmployeeID", "e"."Address", "e"."BirthDate", "e"."City", "e"."Country", "e"."Extension", "e"."FirstName", "e"."HireDate", "e"."HomePhone", "e"."IsDeleted", "e"."LastName", "e"."Notes", "e"."Photo", "e"."PhotoPath", "e"."PostalCode", "e"."Region", "e"."ReportsTo", "e"."Title", "e"."TitleOfCourtesy", "e1"."EmployeeID", "e1"."Address", "e1"."BirthDate", "e1"."City", "e1"."Country", "e1"."Extension", "e1"."FirstName", "e1"."HireDate", "e1"."HomePhone", "e1"."IsDeleted", "e1"."LastName", "e1"."Notes", "e1"."Photo", "e1"."PhotoPath", "e1"."PostalCode", "e1"."Region", "e1"."ReportsTo", "e1"."Title", "e1"."TitleOfCourtesy" +FROM "Employees" AS "e" +LEFT JOIN ( + SELECT "e0"."EmployeeID", "e0"."Address", "e0"."BirthDate", "e0"."City", "e0"."Country", "e0"."Extension", "e0"."FirstName", "e0"."HireDate", "e0"."HomePhone", "e0"."IsDeleted", "e0"."LastName", "e0"."Notes", "e0"."Photo", "e0"."PhotoPath", "e0"."PostalCode", "e0"."Region", "e0"."ReportsTo", "e0"."Title", "e0"."TitleOfCourtesy" + FROM "Employees" AS "e0" + WHERE @__ef_filter__p_0 OR NOT ("e0"."IsDeleted") OR NOT ("e0"."IsDeleted") +) AS "e1" ON "e"."ReportsTo" = "e1"."EmployeeID" +WHERE @__ef_filter__p_0 OR NOT ("e"."IsDeleted") OR NOT ("e"."IsDeleted") + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SQLite.MS,True).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SQLite.MS,True).sql new file mode 100644 index 00000000000..4efb4d9b4ae --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SQLite.MS,True).sql @@ -0,0 +1,15 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +-- Tagged query + +SELECT "e"."EmployeeID", "e"."Address", "e"."BirthDate", "e"."City", "e"."Country", "e"."Extension", "e"."FirstName", "e"."HireDate", "e"."HomePhone", "e"."IsDeleted", "e"."LastName", "e"."Notes", "e"."Photo", "e"."PhotoPath", "e"."PostalCode", "e"."Region", "e"."ReportsTo", "e"."Title", "e"."TitleOfCourtesy", "e1"."EmployeeID", "e1"."Address", "e1"."BirthDate", "e1"."City", "e1"."Country", "e1"."Extension", "e1"."FirstName", "e1"."HireDate", "e1"."HomePhone", "e1"."IsDeleted", "e1"."LastName", "e1"."Notes", "e1"."Photo", "e1"."PhotoPath", "e1"."PostalCode", "e1"."Region", "e1"."ReportsTo", "e1"."Title", "e1"."TitleOfCourtesy" +FROM "Employees" AS "e" +LEFT JOIN ( + SELECT "e0"."EmployeeID", "e0"."Address", "e0"."BirthDate", "e0"."City", "e0"."Country", "e0"."Extension", "e0"."FirstName", "e0"."HireDate", "e0"."HomePhone", "e0"."IsDeleted", "e0"."LastName", "e0"."Notes", "e0"."Photo", "e0"."PhotoPath", "e0"."PostalCode", "e0"."Region", "e0"."ReportsTo", "e0"."Title", "e0"."TitleOfCourtesy" + FROM "Employees" AS "e0" + WHERE @__ef_filter__p_0 OR NOT ("e0"."IsDeleted") OR NOT ("e0"."IsDeleted") +) AS "e1" ON "e"."ReportsTo" = "e1"."EmployeeID" +WHERE @__ef_filter__p_0 OR NOT ("e"."IsDeleted") OR NOT ("e"."IsDeleted") + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SQLite.MS,False).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SQLite.MS,False).sql new file mode 100644 index 00000000000..68dc7729406 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SQLite.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT MAX("p"."QuantityPerUnit") +FROM "Products" AS "p" +WHERE (@__ef_filter__p_0 OR NOT ("p"."IsDeleted") OR NOT ("p"."IsDeleted")) AND "p"."ProductName" LIKE 'U%' + + diff --git a/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SQLite.MS,True).sql b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SQLite.MS,True).sql new file mode 100644 index 00000000000..68dc7729406 --- /dev/null +++ b/SQLite.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SQLite.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT MAX("p"."QuantityPerUnit") +FROM "Products" AS "p" +WHERE (@__ef_filter__p_0 OR NOT ("p"."IsDeleted") OR NOT ("p"."IsDeleted")) AND "p"."ProductName" LIKE 'U%' + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ConvertorTests/LinqToDB.EntityFrameworkCore.Tests.ConvertorTests.TestToList(SqlServer.2016.MS).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ConvertorTests/LinqToDB.EntityFrameworkCore.Tests.ConvertorTests.TestToList(SqlServer.2016.MS).sql new file mode 100644 index 00000000000..4509e56882e --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ConvertorTests/LinqToDB.EntityFrameworkCore.Tests.ConvertorTests.TestToList(SqlServer.2016.MS).sql @@ -0,0 +1,5 @@ +SELECT [s].[Id], [s].[Code], [s].[IsDeleted], [s].[Name], [s].[PermanentId] +FROM [Subdivisions] AS [s] +WHERE CAST([s].[Id] AS bigint) = CAST(1 AS bigint) + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestAmbiguousProperties(SqlServer.2016.MS).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestAmbiguousProperties(SqlServer.2016.MS).sql new file mode 100644 index 00000000000..3c073d8eed0 --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestAmbiguousProperties(SqlServer.2016.MS).sql @@ -0,0 +1,5 @@ +SELECT [w].[Id], [w].[Value] +FROM [WithDuplicateProperties] AS [w] +WHERE [w].[Value] = 1 + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestInheritance(SqlServer.2016.MS).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestInheritance(SqlServer.2016.MS).sql new file mode 100644 index 00000000000..40314a1747b --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestInheritance(SqlServer.2016.MS).sql @@ -0,0 +1,17 @@ +Parameters: +@p0='?' (Size = 21), @p1='?' (Size = 21), @p2='?' (Size = 21), @p3='?' (Size = 21), @p4='?' (Size = 21) + +SET IMPLICIT_TRANSACTIONS OFF; +SET NOCOUNT ON; +MERGE [WithInheritance] USING ( +VALUES (@p0, 0), +(@p1, 1), +(@p2, 2), +(@p3, 3), +(@p4, 4)) AS i ([Discriminator], _Position) ON 1=0 +WHEN NOT MATCHED THEN +INSERT ([Discriminator]) +VALUES (i.[Discriminator]) +OUTPUT INSERTED.[Id], i._Position; + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestUIntTable(SqlServer.2016.MS).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestUIntTable(SqlServer.2016.MS).sql new file mode 100644 index 00000000000..1c910246616 --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestUIntTable(SqlServer.2016.MS).sql @@ -0,0 +1,10 @@ +Parameters: +@p0='?' (DbType = Int32), @p1='?' (DbType = Int32), @p2='?' (DbType = Int64), @p3='?' (DbType = Int64), @p4='?' (Precision = 20) (DbType = Decimal), @p5='?' (Precision = 20) (DbType = Decimal) + +SET IMPLICIT_TRANSACTIONS OFF; +SET NOCOUNT ON; +INSERT INTO [UIntTable] ([Field16], [Field16N], [Field32], [Field32N], [Field64], [Field64N]) +OUTPUT INSERTED.[ID] +VALUES (@p0, @p1, @p2, @p3, @p4, @p5); + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2016.MS,Default).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2016.MS,Default).sql new file mode 100644 index 00000000000..d005c63a292 --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2016.MS,Default).sql @@ -0,0 +1,4 @@ +SELECT [b].[Id], [b].[BlogType], [b].[Url] +FROM [Blogs] AS [b] + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2016.MS,MultipleRows).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2016.MS,MultipleRows).sql new file mode 100644 index 00000000000..d005c63a292 --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2016.MS,MultipleRows).sql @@ -0,0 +1,4 @@ +SELECT [b].[Id], [b].[BlogType], [b].[Url] +FROM [Blogs] AS [b] + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2016.MS,ProviderSpecific).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2016.MS,ProviderSpecific).sql new file mode 100644 index 00000000000..d005c63a292 --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2016.MS,ProviderSpecific).sql @@ -0,0 +1,4 @@ +SELECT [b].[Id], [b].[BlogType], [b].[Url] +FROM [Blogs] AS [b] + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2016.MS,RowByRow).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2016.MS,RowByRow).sql new file mode 100644 index 00000000000..d005c63a292 --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2016.MS,RowByRow).sql @@ -0,0 +1,4 @@ +SELECT [b].[Id], [b].[BlogType], [b].[Url] +FROM [Blogs] AS [b] + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InterceptorTests/LinqToDB.EntityFrameworkCore.Tests.InterceptorTests.TestEfCoreSideOfComboInterceptor(SqlServer.2016.MS).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InterceptorTests/LinqToDB.EntityFrameworkCore.Tests.InterceptorTests.TestEfCoreSideOfComboInterceptor(SqlServer.2016.MS).sql new file mode 100644 index 00000000000..550d60442c5 --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InterceptorTests/LinqToDB.EntityFrameworkCore.Tests.InterceptorTests.TestEfCoreSideOfComboInterceptor(SqlServer.2016.MS).sql @@ -0,0 +1,9 @@ +Parameters: +@__p_0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT TOP(@__p_0) [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductID] > 0 +ORDER BY [p].[ProductID] + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue117Test(SqlServer.2016.MS).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue117Test(SqlServer.2016.MS).sql new file mode 100644 index 00000000000..1e0723a91d2 --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue117Test(SqlServer.2016.MS).sql @@ -0,0 +1,9 @@ +Parameters: +@__userId_1='?' (DbType = Int32), @__userId_0='?' (DbType = Int32) + +SELECT [p].[Id] AS [PatentId], @__userId_1 AS [UserId] +FROM [Patents] AS [p] +LEFT JOIN [PatentAssessment] AS [p0] ON [p].[Id] = [p0].[PatentId] +WHERE [p0].[PatentId] IS NULL OR [p0].[TechnicalReviewerId] <> @__userId_0 OR [p0].[TechnicalReviewerId] IS NULL + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue73Test(SqlServer.2016.MS).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue73Test(SqlServer.2016.MS).sql new file mode 100644 index 00000000000..6a6908a5aa9 --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue73Test(SqlServer.2016.MS).sql @@ -0,0 +1,6 @@ +SELECT COALESCE([i0].[Name], N'') + N'>' + [i].[Name] +FROM [Issue73Entities] AS [i] +LEFT JOIN [Issue73Entities] AS [i0] ON [i].[ParentId] = [i0].[Id] +WHERE [i].[Name] = N'Name1_3' + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated(SqlServer.2016.MS).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated(SqlServer.2016.MS).sql new file mode 100644 index 00000000000..761b1ced8fe --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated(SqlServer.2016.MS).sql @@ -0,0 +1,10 @@ +Parameters: +p0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [l].[CategoryID], [l].[CategoryName], [l].[Description], [l].[IsDeleted], [l].[Picture] +FROM ( + SELECT * FROM [dbo].[Categories] WHERE CategoryId = @p0 +) AS [l] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated2(SqlServer.2016.MS).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated2(SqlServer.2016.MS).sql new file mode 100644 index 00000000000..4e7025136cc --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated2(SqlServer.2016.MS).sql @@ -0,0 +1,15 @@ +Parameters: +p0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [l0].[CategoryID], [l0].[CategoryName], [l0].[Description], [l0].[IsDeleted], [l0].[Picture] +FROM [Categories] AS [c] +CROSS JOIN ( + SELECT [l].[CategoryID], [l].[CategoryName], [l].[Description], [l].[IsDeleted], [l].[Picture] + FROM ( + SELECT * FROM [dbo].[Categories] WHERE CategoryId = @p0 + ) AS [l] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) +) AS [l0] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw(SqlServer.2016.MS).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw(SqlServer.2016.MS).sql new file mode 100644 index 00000000000..761b1ced8fe --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw(SqlServer.2016.MS).sql @@ -0,0 +1,10 @@ +Parameters: +p0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [l].[CategoryID], [l].[CategoryName], [l].[Description], [l].[IsDeleted], [l].[Picture] +FROM ( + SELECT * FROM [dbo].[Categories] WHERE CategoryId = @p0 +) AS [l] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw2(SqlServer.2016.MS).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw2(SqlServer.2016.MS).sql new file mode 100644 index 00000000000..4e7025136cc --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw2(SqlServer.2016.MS).sql @@ -0,0 +1,15 @@ +Parameters: +p0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [l0].[CategoryID], [l0].[CategoryName], [l0].[Description], [l0].[IsDeleted], [l0].[Picture] +FROM [Categories] AS [c] +CROSS JOIN ( + SELECT [l].[CategoryID], [l].[CategoryName], [l].[Description], [l].[IsDeleted], [l].[Picture] + FROM ( + SELECT * FROM [dbo].[Categories] WHERE CategoryId = @p0 + ) AS [l] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) +) AS [l0] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.NavigationProperties(SqlServer.2016.MS).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.NavigationProperties(SqlServer.2016.MS).sql new file mode 100644 index 00000000000..4787fb868ab --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.NavigationProperties(SqlServer.2016.MS).sql @@ -0,0 +1,24 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o1].[OrderID], [o1].[ProductID], [p0].[ProductID], [o3].[OrderId], [o3].[ProductId], [o3].[Quantity], [o1].[Quantity], [p0].[ProductName] +FROM [Orders] AS [o] +INNER JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Quantity] + FROM [Order Details] AS [o0] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [o1] ON [o].[OrderID] = [o1].[OrderID] +INNER JOIN ( + SELECT [p].[ProductID], [p].[ProductName] + FROM [Products] AS [p] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) +) AS [p0] ON [o1].[ProductID] = [p0].[ProductID] +LEFT JOIN ( + SELECT [o2].[OrderID] AS [OrderId], [o2].[ProductID] AS [ProductId], [o2].[Quantity] + FROM [Order Details] AS [o2] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o2].[IsDeleted] = CAST(0 AS bit) OR [o2].[IsDeleted] = CAST(0 AS bit) +) AS [o3] ON [p0].[ProductID] = [o3].[ProductId] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [o1].[OrderID], [o1].[ProductID], [p0].[ProductID], [o3].[OrderId] + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.2016.MS,False).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.2016.MS,False).sql new file mode 100644 index 00000000000..d971cbfab3d --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.2016.MS,False).sql @@ -0,0 +1,28 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%' + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%' + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT CASE + WHEN EXISTS ( + SELECT 1 + FROM [Products] AS [p] + WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%') THEN CAST(1 AS bit) + ELSE CAST(0 AS bit) +END + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.2016.MS,True).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.2016.MS,True).sql new file mode 100644 index 00000000000..d971cbfab3d --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.2016.MS,True).sql @@ -0,0 +1,28 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%' + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%' + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT CASE + WHEN EXISTS ( + SELECT 1 + FROM [Products] AS [p] + WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%') THEN CAST(1 AS bit) + ELSE CAST(0 AS bit) +END + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.2016.MS,False).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.2016.MS,False).sql new file mode 100644 index 00000000000..5c143463885 --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.2016.MS,False).sql @@ -0,0 +1,10 @@ +Parameters: +@p1='?' (DbType = Int32), @p2='?' (DbType = Int32), @p0='?' (DbType = Currency) + +SET IMPLICIT_TRANSACTIONS OFF; +SET NOCOUNT ON; +UPDATE [Order Details] SET [UnitPrice] = @p0 +OUTPUT 1 +WHERE [OrderID] = @p1 AND [ProductID] = @p2; + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.2016.MS,True).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.2016.MS,True).sql new file mode 100644 index 00000000000..5c143463885 --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.2016.MS,True).sql @@ -0,0 +1,10 @@ +Parameters: +@p1='?' (DbType = Int32), @p2='?' (DbType = Int32), @p0='?' (DbType = Currency) + +SET IMPLICIT_TRANSACTIONS OFF; +SET NOCOUNT ON; +UPDATE [Order Details] SET [UnitPrice] = @p0 +OUTPUT 1 +WHERE [OrderID] = @p1 AND [ProductID] = @p2; + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestCommandTimeout(SqlServer.2016.MS).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestCommandTimeout(SqlServer.2016.MS).sql new file mode 100644 index 00000000000..54eea14853c --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestCommandTimeout(SqlServer.2016.MS).sql @@ -0,0 +1,19 @@ +CREATE OR ALTER FUNCTION dbo.[ProcessLong] + ( + @secondsNumber int + ) + RETURNS int + AS + BEGIN + declare @startTime datetime = getutcdate() + while datediff(second, @startTime, getutcdate()) < @secondsNumber + begin + set @startTime = @startTime + end + return 1 + END + + +DROP FUNCTION IF EXISTS [dbo].[ProcessLong] + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.2016.MS,False).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.2016.MS,False).sql new file mode 100644 index 00000000000..26064712104 --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.2016.MS,False).sql @@ -0,0 +1,24 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [s].[OrderID], [s].[ProductID], [s].[Discount], [s].[IsDeleted], [s].[Quantity], [s].[UnitPrice], [s].[ProductID0], [s].[CategoryID], [s].[Discontinued], [s].[IsDeleted0], [s].[PeriodEnd], [s].[PeriodStart], [s].[ProductName], [s].[QuantityPerUnit], [s].[ReorderLevel], [s].[SupplierID], [s].[UnitPrice0], [s].[UnitsInStock], [s].[UnitsOnOrder], [s].[OrderID0], [s].[ProductID1], [s].[Discount0], [s].[IsDeleted1], [s].[Quantity0], [s].[UnitPrice1] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder], [o2].[OrderID] AS [OrderID0], [o2].[ProductID] AS [ProductID1], [o2].[Discount] AS [Discount0], [o2].[IsDeleted] AS [IsDeleted1], [o2].[Quantity] AS [Quantity0], [o2].[UnitPrice] AS [UnitPrice1] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + LEFT JOIN ( + SELECT [o1].[OrderID], [o1].[ProductID], [o1].[Discount], [o1].[IsDeleted], [o1].[Quantity], [o1].[UnitPrice] + FROM [Order Details] AS [o1] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o1].[IsDeleted] = CAST(0 AS bit) OR [o1].[IsDeleted] = CAST(0 AS bit) + ) AS [o2] ON [p0].[ProductID] = [o2].[ProductID] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [o].[OrderID] = [s].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [s].[OrderID], [s].[ProductID], [s].[ProductID0], [s].[OrderID0] + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.2016.MS,True).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.2016.MS,True).sql new file mode 100644 index 00000000000..26064712104 --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.2016.MS,True).sql @@ -0,0 +1,24 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [s].[OrderID], [s].[ProductID], [s].[Discount], [s].[IsDeleted], [s].[Quantity], [s].[UnitPrice], [s].[ProductID0], [s].[CategoryID], [s].[Discontinued], [s].[IsDeleted0], [s].[PeriodEnd], [s].[PeriodStart], [s].[ProductName], [s].[QuantityPerUnit], [s].[ReorderLevel], [s].[SupplierID], [s].[UnitPrice0], [s].[UnitsInStock], [s].[UnitsOnOrder], [s].[OrderID0], [s].[ProductID1], [s].[Discount0], [s].[IsDeleted1], [s].[Quantity0], [s].[UnitPrice1] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder], [o2].[OrderID] AS [OrderID0], [o2].[ProductID] AS [ProductID1], [o2].[Discount] AS [Discount0], [o2].[IsDeleted] AS [IsDeleted1], [o2].[Quantity] AS [Quantity0], [o2].[UnitPrice] AS [UnitPrice1] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + LEFT JOIN ( + SELECT [o1].[OrderID], [o1].[ProductID], [o1].[Discount], [o1].[IsDeleted], [o1].[Quantity], [o1].[UnitPrice] + FROM [Order Details] AS [o1] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o1].[IsDeleted] = CAST(0 AS bit) OR [o1].[IsDeleted] = CAST(0 AS bit) + ) AS [o2] ON [p0].[ProductID] = [o2].[ProductID] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [o].[OrderID] = [s].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [s].[OrderID], [s].[ProductID], [s].[ProductID0], [s].[OrderID0] + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.2016.MS,False).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.2016.MS,False).sql new file mode 100644 index 00000000000..ea7933460c5 --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.2016.MS,False).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [o].[OrderID], [s].[EmployeeID], [s].[TerritoryID], [s].[IsDeleted], [s].[TerritoryID0], [s].[IsDeleted0], [s].[RegionID], [s].[TerritoryDescription], [s0].[OrderID], [s0].[ProductID], [s0].[Discount], [s0].[IsDeleted], [s0].[Quantity], [s0].[UnitPrice], [s0].[ProductID0], [s0].[CategoryID], [s0].[Discontinued], [s0].[IsDeleted0], [s0].[PeriodEnd], [s0].[PeriodStart], [s0].[ProductName], [s0].[QuantityPerUnit], [s0].[ReorderLevel], [s0].[SupplierID], [s0].[UnitPrice0], [s0].[UnitsInStock], [s0].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted], [t0].[TerritoryID] AS [TerritoryID0], [t0].[IsDeleted] AS [IsDeleted0], [t0].[RegionID], [t0].[TerritoryDescription] + FROM [EmployeeTerritories] AS [e1] + INNER JOIN ( + SELECT [t].[TerritoryID], [t].[IsDeleted], [t].[RegionID], [t].[TerritoryDescription] + FROM [Territories] AS [t] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) + ) AS [t0] ON [e1].[TerritoryID] = [t0].[TerritoryID] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [e0].[EmployeeID] = [s].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_5 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s0] ON [o].[OrderID] = [s0].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [s].[EmployeeID], [s].[TerritoryID], [s].[TerritoryID0], [s0].[OrderID], [s0].[ProductID] + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.2016.MS,True).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.2016.MS,True).sql new file mode 100644 index 00000000000..ea7933460c5 --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.2016.MS,True).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [o].[OrderID], [s].[EmployeeID], [s].[TerritoryID], [s].[IsDeleted], [s].[TerritoryID0], [s].[IsDeleted0], [s].[RegionID], [s].[TerritoryDescription], [s0].[OrderID], [s0].[ProductID], [s0].[Discount], [s0].[IsDeleted], [s0].[Quantity], [s0].[UnitPrice], [s0].[ProductID0], [s0].[CategoryID], [s0].[Discontinued], [s0].[IsDeleted0], [s0].[PeriodEnd], [s0].[PeriodStart], [s0].[ProductName], [s0].[QuantityPerUnit], [s0].[ReorderLevel], [s0].[SupplierID], [s0].[UnitPrice0], [s0].[UnitsInStock], [s0].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted], [t0].[TerritoryID] AS [TerritoryID0], [t0].[IsDeleted] AS [IsDeleted0], [t0].[RegionID], [t0].[TerritoryDescription] + FROM [EmployeeTerritories] AS [e1] + INNER JOIN ( + SELECT [t].[TerritoryID], [t].[IsDeleted], [t].[RegionID], [t].[TerritoryDescription] + FROM [Territories] AS [t] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) + ) AS [t0] ON [e1].[TerritoryID] = [t0].[TerritoryID] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [e0].[EmployeeID] = [s].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_5 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s0] ON [o].[OrderID] = [s0].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [s].[EmployeeID], [s].[TerritoryID], [s].[TerritoryID0], [s0].[OrderID], [s0].[ProductID] + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.2016.MS,False).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.2016.MS,False).sql new file mode 100644 index 00000000000..1b9ca7c0743 --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.2016.MS,False).sql @@ -0,0 +1,13 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy], [e1].[EmployeeID], [e1].[Address], [e1].[BirthDate], [e1].[City], [e1].[Country], [e1].[Extension], [e1].[FirstName], [e1].[HireDate], [e1].[HomePhone], [e1].[IsDeleted], [e1].[LastName], [e1].[Notes], [e1].[Photo], [e1].[PhotoPath], [e1].[PostalCode], [e1].[Region], [e1].[ReportsTo], [e1].[Title], [e1].[TitleOfCourtesy] +FROM [Employees] AS [e] +LEFT JOIN ( + SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy] + FROM [Employees] AS [e0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) +) AS [e1] ON [e].[ReportsTo] = [e1].[EmployeeID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.2016.MS,True).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.2016.MS,True).sql new file mode 100644 index 00000000000..1b9ca7c0743 --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.2016.MS,True).sql @@ -0,0 +1,13 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy], [e1].[EmployeeID], [e1].[Address], [e1].[BirthDate], [e1].[City], [e1].[Country], [e1].[Extension], [e1].[FirstName], [e1].[HireDate], [e1].[HomePhone], [e1].[IsDeleted], [e1].[LastName], [e1].[Notes], [e1].[Photo], [e1].[PhotoPath], [e1].[PostalCode], [e1].[Region], [e1].[ReportsTo], [e1].[Title], [e1].[TitleOfCourtesy] +FROM [Employees] AS [e] +LEFT JOIN ( + SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy] + FROM [Employees] AS [e0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) +) AS [e1] ON [e].[ReportsTo] = [e1].[EmployeeID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.2016.MS,False).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.2016.MS,False).sql new file mode 100644 index 00000000000..3180e5e2124 --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.2016.MS,False).sql @@ -0,0 +1,18 @@ +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[IsDeleted], [o].[Quantity], [o].[UnitPrice] +FROM [Products] AS [p] +INNER JOIN [Order Details] AS [o] ON [p].[ProductID] = [o].[ProductID] + + +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice] +FROM [Products] AS [p] +INNER JOIN ( + SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[IsDeleted], [o].[Quantity], [o].[UnitPrice] + FROM [Order Details] AS [o] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +) AS [o0] ON [p].[ProductID] = [o0].[ProductID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.2016.MS,True).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.2016.MS,True).sql new file mode 100644 index 00000000000..3180e5e2124 --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.2016.MS,True).sql @@ -0,0 +1,18 @@ +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[IsDeleted], [o].[Quantity], [o].[UnitPrice] +FROM [Products] AS [p] +INNER JOIN [Order Details] AS [o] ON [p].[ProductID] = [o].[ProductID] + + +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice] +FROM [Products] AS [p] +INNER JOIN ( + SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[IsDeleted], [o].[Quantity], [o].[UnitPrice] + FROM [Order Details] AS [o] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +) AS [o0] ON [p].[ProductID] = [o0].[ProductID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.2016.MS,False).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.2016.MS,False).sql new file mode 100644 index 00000000000..d17a1454daa --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.2016.MS,False).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [s].[EmployeeID], [s].[TerritoryID], [s].[IsDeleted], [s].[TerritoryID0], [s].[IsDeleted0], [s].[RegionID], [s].[TerritoryDescription], [s0].[OrderID], [s0].[ProductID], [s0].[Discount], [s0].[IsDeleted], [s0].[Quantity], [s0].[UnitPrice], [s0].[ProductID0], [s0].[CategoryID], [s0].[Discontinued], [s0].[IsDeleted0], [s0].[PeriodEnd], [s0].[PeriodStart], [s0].[ProductName], [s0].[QuantityPerUnit], [s0].[ReorderLevel], [s0].[SupplierID], [s0].[UnitPrice0], [s0].[UnitsInStock], [s0].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted], [t0].[TerritoryID] AS [TerritoryID0], [t0].[IsDeleted] AS [IsDeleted0], [t0].[RegionID], [t0].[TerritoryDescription] + FROM [EmployeeTerritories] AS [e1] + INNER JOIN ( + SELECT [t].[TerritoryID], [t].[IsDeleted], [t].[RegionID], [t].[TerritoryDescription] + FROM [Territories] AS [t] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) + ) AS [t0] ON [e1].[TerritoryID] = [t0].[TerritoryID] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [e0].[EmployeeID] = [s].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_5 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s0] ON [o].[OrderID] = [s0].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [s].[EmployeeID], [s].[TerritoryID], [s].[TerritoryID0], [s0].[OrderID], [s0].[ProductID] + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.2016.MS,True).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.2016.MS,True).sql new file mode 100644 index 00000000000..d17a1454daa --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.2016.MS,True).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [s].[EmployeeID], [s].[TerritoryID], [s].[IsDeleted], [s].[TerritoryID0], [s].[IsDeleted0], [s].[RegionID], [s].[TerritoryDescription], [s0].[OrderID], [s0].[ProductID], [s0].[Discount], [s0].[IsDeleted], [s0].[Quantity], [s0].[UnitPrice], [s0].[ProductID0], [s0].[CategoryID], [s0].[Discontinued], [s0].[IsDeleted0], [s0].[PeriodEnd], [s0].[PeriodStart], [s0].[ProductName], [s0].[QuantityPerUnit], [s0].[ReorderLevel], [s0].[SupplierID], [s0].[UnitPrice0], [s0].[UnitsInStock], [s0].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted], [t0].[TerritoryID] AS [TerritoryID0], [t0].[IsDeleted] AS [IsDeleted0], [t0].[RegionID], [t0].[TerritoryDescription] + FROM [EmployeeTerritories] AS [e1] + INNER JOIN ( + SELECT [t].[TerritoryID], [t].[IsDeleted], [t].[RegionID], [t].[TerritoryDescription] + FROM [Territories] AS [t] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) + ) AS [t0] ON [e1].[TerritoryID] = [t0].[TerritoryID] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [e0].[EmployeeID] = [s].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_5 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s0] ON [o].[OrderID] = [s0].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [s].[EmployeeID], [s].[TerritoryID], [s].[TerritoryID0], [s0].[OrderID], [s0].[ProductID] + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.2016.MS,False).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.2016.MS,False).sql new file mode 100644 index 00000000000..def257d2102 --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.2016.MS,False).sql @@ -0,0 +1,29 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [e2].[EmployeeID], [e2].[TerritoryID], [e2].[IsDeleted], [s].[OrderID], [s].[ProductID], [s].[Discount], [s].[IsDeleted], [s].[Quantity], [s].[UnitPrice], [s].[ProductID0], [s].[CategoryID], [s].[Discontinued], [s].[IsDeleted0], [s].[PeriodEnd], [s].[PeriodStart], [s].[ProductName], [s].[QuantityPerUnit], [s].[ReorderLevel], [s].[SupplierID], [s].[UnitPrice0], [s].[UnitsInStock], [s].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted] + FROM [EmployeeTerritories] AS [e1] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [e2] ON [e0].[EmployeeID] = [e2].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [o].[OrderID] = [s].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [e2].[EmployeeID], [e2].[TerritoryID], [s].[OrderID], [s].[ProductID] + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.2016.MS,True).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.2016.MS,True).sql new file mode 100644 index 00000000000..def257d2102 --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.2016.MS,True).sql @@ -0,0 +1,29 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [e2].[EmployeeID], [e2].[TerritoryID], [e2].[IsDeleted], [s].[OrderID], [s].[ProductID], [s].[Discount], [s].[IsDeleted], [s].[Quantity], [s].[UnitPrice], [s].[ProductID0], [s].[CategoryID], [s].[Discontinued], [s].[IsDeleted0], [s].[PeriodEnd], [s].[PeriodStart], [s].[ProductName], [s].[QuantityPerUnit], [s].[ReorderLevel], [s].[SupplierID], [s].[UnitPrice0], [s].[UnitsInStock], [s].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted] + FROM [EmployeeTerritories] AS [e1] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [e2] ON [e0].[EmployeeID] = [e2].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [o].[OrderID] = [s].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [e2].[EmployeeID], [e2].[TerritoryID], [s].[OrderID], [s].[ProductID] + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.2016.MS,False).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.2016.MS,False).sql new file mode 100644 index 00000000000..76f07dd62df --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.2016.MS,False).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT [p].[ProductName], [p].[ProductID], [s1].[Discount], [s1].[OrderID], [s1].[CustomerID], [s1].[EmployeeID], [s1].[Freight], [s1].[IsDeleted], [s1].[OrderDate], [s1].[RequiredDate], [s1].[ShipAddress], [s1].[ShipCity], [s1].[ShipCountry], [s1].[ShipName], [s1].[ShipPostalCode], [s1].[ShipRegion], [s1].[ShipVia], [s1].[ShippedDate], [s1].[OrderID0], [s1].[ProductID], [s1].[ProductID0], [s1].[SupplierID], [s1].[ProductID1], [s1].[CategoryID], [s1].[Discontinued], [s1].[IsDeleted0], [s1].[PeriodEnd], [s1].[PeriodStart], [s1].[ProductName], [s1].[QuantityPerUnit], [s1].[ReorderLevel], [s1].[SupplierID0], [s1].[UnitPrice], [s1].[UnitsInStock], [s1].[UnitsOnOrder] +FROM [Products] AS [p] +LEFT JOIN ( + SELECT [o].[Discount], [o1].[OrderID], [o1].[CustomerID], [o1].[EmployeeID], [o1].[Freight], [o1].[IsDeleted], [o1].[OrderDate], [o1].[RequiredDate], [o1].[ShipAddress], [o1].[ShipCity], [o1].[ShipCountry], [o1].[ShipName], [o1].[ShipPostalCode], [o1].[ShipRegion], [o1].[ShipVia], [o1].[ShippedDate], [o].[OrderID] AS [OrderID0], [o].[ProductID], [p1].[ProductID] AS [ProductID0], [s0].[SupplierID], [p3].[ProductID] AS [ProductID1], [p3].[CategoryID], [p3].[Discontinued], [p3].[IsDeleted] AS [IsDeleted0], [p3].[PeriodEnd], [p3].[PeriodStart], [p3].[ProductName], [p3].[QuantityPerUnit], [p3].[ReorderLevel], [p3].[SupplierID] AS [SupplierID0], [p3].[UnitPrice], [p3].[UnitsInStock], [p3].[UnitsOnOrder] + FROM [Order Details] AS [o] + INNER JOIN ( + SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[Freight], [o0].[IsDeleted], [o0].[OrderDate], [o0].[RequiredDate], [o0].[ShipAddress], [o0].[ShipCity], [o0].[ShipCountry], [o0].[ShipName], [o0].[ShipPostalCode], [o0].[ShipRegion], [o0].[ShipVia], [o0].[ShippedDate] + FROM [Orders] AS [o0] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) + ) AS [o1] ON [o].[OrderID] = [o1].[OrderID] + INNER JOIN ( + SELECT [p0].[ProductID], [p0].[SupplierID] + FROM [Products] AS [p0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) + ) AS [p1] ON [o].[ProductID] = [p1].[ProductID] + LEFT JOIN ( + SELECT [s].[SupplierID] + FROM [Suppliers] AS [s] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [s].[IsDeleted] = CAST(0 AS bit) OR [s].[IsDeleted] = CAST(0 AS bit) + ) AS [s0] ON [p1].[SupplierID] = [s0].[SupplierID] + LEFT JOIN ( + SELECT [p2].[ProductID], [p2].[CategoryID], [p2].[Discontinued], [p2].[IsDeleted], [p2].[PeriodEnd], [p2].[PeriodStart], [p2].[ProductName], [p2].[QuantityPerUnit], [p2].[ReorderLevel], [p2].[SupplierID], [p2].[UnitPrice], [p2].[UnitsInStock], [p2].[UnitsOnOrder] + FROM [Products] AS [p2] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p2].[IsDeleted] = CAST(0 AS bit) OR [p2].[IsDeleted] = CAST(0 AS bit) + ) AS [p3] ON [s0].[SupplierID] = [p3].[SupplierID] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +) AS [s1] ON [p].[ProductID] = [s1].[ProductID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) +ORDER BY [p].[ProductID], [s1].[OrderID0], [s1].[ProductID], [s1].[OrderID], [s1].[ProductID0], [s1].[SupplierID] + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.2016.MS,True).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.2016.MS,True).sql new file mode 100644 index 00000000000..76f07dd62df --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.2016.MS,True).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT [p].[ProductName], [p].[ProductID], [s1].[Discount], [s1].[OrderID], [s1].[CustomerID], [s1].[EmployeeID], [s1].[Freight], [s1].[IsDeleted], [s1].[OrderDate], [s1].[RequiredDate], [s1].[ShipAddress], [s1].[ShipCity], [s1].[ShipCountry], [s1].[ShipName], [s1].[ShipPostalCode], [s1].[ShipRegion], [s1].[ShipVia], [s1].[ShippedDate], [s1].[OrderID0], [s1].[ProductID], [s1].[ProductID0], [s1].[SupplierID], [s1].[ProductID1], [s1].[CategoryID], [s1].[Discontinued], [s1].[IsDeleted0], [s1].[PeriodEnd], [s1].[PeriodStart], [s1].[ProductName], [s1].[QuantityPerUnit], [s1].[ReorderLevel], [s1].[SupplierID0], [s1].[UnitPrice], [s1].[UnitsInStock], [s1].[UnitsOnOrder] +FROM [Products] AS [p] +LEFT JOIN ( + SELECT [o].[Discount], [o1].[OrderID], [o1].[CustomerID], [o1].[EmployeeID], [o1].[Freight], [o1].[IsDeleted], [o1].[OrderDate], [o1].[RequiredDate], [o1].[ShipAddress], [o1].[ShipCity], [o1].[ShipCountry], [o1].[ShipName], [o1].[ShipPostalCode], [o1].[ShipRegion], [o1].[ShipVia], [o1].[ShippedDate], [o].[OrderID] AS [OrderID0], [o].[ProductID], [p1].[ProductID] AS [ProductID0], [s0].[SupplierID], [p3].[ProductID] AS [ProductID1], [p3].[CategoryID], [p3].[Discontinued], [p3].[IsDeleted] AS [IsDeleted0], [p3].[PeriodEnd], [p3].[PeriodStart], [p3].[ProductName], [p3].[QuantityPerUnit], [p3].[ReorderLevel], [p3].[SupplierID] AS [SupplierID0], [p3].[UnitPrice], [p3].[UnitsInStock], [p3].[UnitsOnOrder] + FROM [Order Details] AS [o] + INNER JOIN ( + SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[Freight], [o0].[IsDeleted], [o0].[OrderDate], [o0].[RequiredDate], [o0].[ShipAddress], [o0].[ShipCity], [o0].[ShipCountry], [o0].[ShipName], [o0].[ShipPostalCode], [o0].[ShipRegion], [o0].[ShipVia], [o0].[ShippedDate] + FROM [Orders] AS [o0] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) + ) AS [o1] ON [o].[OrderID] = [o1].[OrderID] + INNER JOIN ( + SELECT [p0].[ProductID], [p0].[SupplierID] + FROM [Products] AS [p0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) + ) AS [p1] ON [o].[ProductID] = [p1].[ProductID] + LEFT JOIN ( + SELECT [s].[SupplierID] + FROM [Suppliers] AS [s] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [s].[IsDeleted] = CAST(0 AS bit) OR [s].[IsDeleted] = CAST(0 AS bit) + ) AS [s0] ON [p1].[SupplierID] = [s0].[SupplierID] + LEFT JOIN ( + SELECT [p2].[ProductID], [p2].[CategoryID], [p2].[Discontinued], [p2].[IsDeleted], [p2].[PeriodEnd], [p2].[PeriodStart], [p2].[ProductName], [p2].[QuantityPerUnit], [p2].[ReorderLevel], [p2].[SupplierID], [p2].[UnitPrice], [p2].[UnitsInStock], [p2].[UnitsOnOrder] + FROM [Products] AS [p2] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p2].[IsDeleted] = CAST(0 AS bit) OR [p2].[IsDeleted] = CAST(0 AS bit) + ) AS [p3] ON [s0].[SupplierID] = [p3].[SupplierID] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +) AS [s1] ON [p].[ProductID] = [s1].[ProductID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) +ORDER BY [p].[ProductID], [s1].[OrderID0], [s1].[ProductID], [s1].[OrderID], [s1].[ProductID0], [s1].[SupplierID] + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.2016.MS,False).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.2016.MS,False).sql new file mode 100644 index 00000000000..5e8fe75715c --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.2016.MS,False).sql @@ -0,0 +1,20 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [p1].[ProductID], [p1].[CategoryID], [p1].[Discontinued], [p1].[IsDeleted], [p1].[PeriodEnd], [p1].[PeriodStart], [p1].[ProductName], [p1].[QuantityPerUnit], [p1].[ReorderLevel], [p1].[SupplierID], [p1].[UnitPrice], [p1].[UnitsInStock], [p1].[UnitsOnOrder] +FROM [Products] AS [p] +CROSS JOIN ( + SELECT [p0].[ProductID], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Products] AS [p0] + WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit)) AND ( + SELECT COUNT(*) + FROM [Order Details] AS [o0] + WHERE (@__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit)) AND [p0].[ProductID] = [o0].[ProductID]) > 0 +) AS [p1] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND ( + SELECT COUNT(*) + FROM [Order Details] AS [o] + WHERE (@__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductID] = [o].[ProductID]) > 0 AND [p].[ProductID] = [p1].[ProductID] +ORDER BY [p].[ProductID] + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.2016.MS,True).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.2016.MS,True).sql new file mode 100644 index 00000000000..5e8fe75715c --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.2016.MS,True).sql @@ -0,0 +1,20 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [p1].[ProductID], [p1].[CategoryID], [p1].[Discontinued], [p1].[IsDeleted], [p1].[PeriodEnd], [p1].[PeriodStart], [p1].[ProductName], [p1].[QuantityPerUnit], [p1].[ReorderLevel], [p1].[SupplierID], [p1].[UnitPrice], [p1].[UnitsInStock], [p1].[UnitsOnOrder] +FROM [Products] AS [p] +CROSS JOIN ( + SELECT [p0].[ProductID], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Products] AS [p0] + WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit)) AND ( + SELECT COUNT(*) + FROM [Order Details] AS [o0] + WHERE (@__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit)) AND [p0].[ProductID] = [o0].[ProductID]) > 0 +) AS [p1] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND ( + SELECT COUNT(*) + FROM [Order Details] AS [o] + WHERE (@__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductID] = [o].[ProductID]) > 0 AND [p].[ProductID] = [p1].[ProductID] +ORDER BY [p].[ProductID] + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.2016.MS,False).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.2016.MS,False).sql new file mode 100644 index 00000000000..03ff17e1f17 --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.2016.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__test_0='?' (DbType = Int32) + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] +FROM [Employees] AS [e] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit)) AND [e].[EmployeeID] = @__test_0 + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.2016.MS,True).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.2016.MS,True).sql new file mode 100644 index 00000000000..03ff17e1f17 --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.2016.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__test_0='?' (DbType = Int32) + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] +FROM [Employees] AS [e] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit)) AND [e].[EmployeeID] = @__test_0 + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.2016.MS,False).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.2016.MS,False).sql new file mode 100644 index 00000000000..e047dc4281d --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.2016.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT TOP(1) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[IsDeleted], [c].[Phone], [c].[PostalCode], [c].[Region] +FROM [Customers] AS [c] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.2016.MS,True).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.2016.MS,True).sql new file mode 100644 index 00000000000..e047dc4281d --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.2016.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT TOP(1) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[IsDeleted], [c].[Phone], [c].[PostalCode], [c].[Region] +FROM [Customers] AS [c] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.2016.MS,False).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.2016.MS,False).sql new file mode 100644 index 00000000000..1d6793b0b8c --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.2016.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[QuantityPerUnit] AS [Quantity] +FROM [Products] AS [p] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.2016.MS,True).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.2016.MS,True).sql new file mode 100644 index 00000000000..1d6793b0b8c --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.2016.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[QuantityPerUnit] AS [Quantity] +FROM [Products] AS [p] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.2016.MS,False).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.2016.MS,False).sql new file mode 100644 index 00000000000..5853efae690 --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.2016.MS,False).sql @@ -0,0 +1,15 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +-- Tagged query + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy], [e1].[EmployeeID], [e1].[Address], [e1].[BirthDate], [e1].[City], [e1].[Country], [e1].[Extension], [e1].[FirstName], [e1].[HireDate], [e1].[HomePhone], [e1].[IsDeleted], [e1].[LastName], [e1].[Notes], [e1].[Photo], [e1].[PhotoPath], [e1].[PostalCode], [e1].[Region], [e1].[ReportsTo], [e1].[Title], [e1].[TitleOfCourtesy] +FROM [Employees] AS [e] +LEFT JOIN ( + SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy] + FROM [Employees] AS [e0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) +) AS [e1] ON [e].[ReportsTo] = [e1].[EmployeeID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.2016.MS,True).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.2016.MS,True).sql new file mode 100644 index 00000000000..5853efae690 --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.2016.MS,True).sql @@ -0,0 +1,15 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +-- Tagged query + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy], [e1].[EmployeeID], [e1].[Address], [e1].[BirthDate], [e1].[City], [e1].[Country], [e1].[Extension], [e1].[FirstName], [e1].[HireDate], [e1].[HomePhone], [e1].[IsDeleted], [e1].[LastName], [e1].[Notes], [e1].[Photo], [e1].[PhotoPath], [e1].[PostalCode], [e1].[Region], [e1].[ReportsTo], [e1].[Title], [e1].[TitleOfCourtesy] +FROM [Employees] AS [e] +LEFT JOIN ( + SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy] + FROM [Employees] AS [e0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) +) AS [e1] ON [e].[ReportsTo] = [e1].[EmployeeID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.2016.MS,False).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.2016.MS,False).sql new file mode 100644 index 00000000000..52ce94a469e --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.2016.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT MAX([p].[QuantityPerUnit]) +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'U%' + + diff --git a/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.2016.MS,True).sql b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.2016.MS,True).sql new file mode 100644 index 00000000000..52ce94a469e --- /dev/null +++ b/SqlServer.2016.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.2016.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT MAX([p].[QuantityPerUnit]) +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'U%' + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ConvertorTests/LinqToDB.EntityFrameworkCore.Tests.ConvertorTests.TestToList(SqlServer.2017.MS).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ConvertorTests/LinqToDB.EntityFrameworkCore.Tests.ConvertorTests.TestToList(SqlServer.2017.MS).sql new file mode 100644 index 00000000000..4509e56882e --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ConvertorTests/LinqToDB.EntityFrameworkCore.Tests.ConvertorTests.TestToList(SqlServer.2017.MS).sql @@ -0,0 +1,5 @@ +SELECT [s].[Id], [s].[Code], [s].[IsDeleted], [s].[Name], [s].[PermanentId] +FROM [Subdivisions] AS [s] +WHERE CAST([s].[Id] AS bigint) = CAST(1 AS bigint) + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestAmbiguousProperties(SqlServer.2017.MS).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestAmbiguousProperties(SqlServer.2017.MS).sql new file mode 100644 index 00000000000..3c073d8eed0 --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestAmbiguousProperties(SqlServer.2017.MS).sql @@ -0,0 +1,5 @@ +SELECT [w].[Id], [w].[Value] +FROM [WithDuplicateProperties] AS [w] +WHERE [w].[Value] = 1 + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestInheritance(SqlServer.2017.MS).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestInheritance(SqlServer.2017.MS).sql new file mode 100644 index 00000000000..40314a1747b --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestInheritance(SqlServer.2017.MS).sql @@ -0,0 +1,17 @@ +Parameters: +@p0='?' (Size = 21), @p1='?' (Size = 21), @p2='?' (Size = 21), @p3='?' (Size = 21), @p4='?' (Size = 21) + +SET IMPLICIT_TRANSACTIONS OFF; +SET NOCOUNT ON; +MERGE [WithInheritance] USING ( +VALUES (@p0, 0), +(@p1, 1), +(@p2, 2), +(@p3, 3), +(@p4, 4)) AS i ([Discriminator], _Position) ON 1=0 +WHEN NOT MATCHED THEN +INSERT ([Discriminator]) +VALUES (i.[Discriminator]) +OUTPUT INSERTED.[Id], i._Position; + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestUIntTable(SqlServer.2017.MS).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestUIntTable(SqlServer.2017.MS).sql new file mode 100644 index 00000000000..1c910246616 --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestUIntTable(SqlServer.2017.MS).sql @@ -0,0 +1,10 @@ +Parameters: +@p0='?' (DbType = Int32), @p1='?' (DbType = Int32), @p2='?' (DbType = Int64), @p3='?' (DbType = Int64), @p4='?' (Precision = 20) (DbType = Decimal), @p5='?' (Precision = 20) (DbType = Decimal) + +SET IMPLICIT_TRANSACTIONS OFF; +SET NOCOUNT ON; +INSERT INTO [UIntTable] ([Field16], [Field16N], [Field32], [Field32N], [Field64], [Field64N]) +OUTPUT INSERTED.[ID] +VALUES (@p0, @p1, @p2, @p3, @p4, @p5); + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2017.MS,Default).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2017.MS,Default).sql new file mode 100644 index 00000000000..d005c63a292 --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2017.MS,Default).sql @@ -0,0 +1,4 @@ +SELECT [b].[Id], [b].[BlogType], [b].[Url] +FROM [Blogs] AS [b] + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2017.MS,MultipleRows).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2017.MS,MultipleRows).sql new file mode 100644 index 00000000000..d005c63a292 --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2017.MS,MultipleRows).sql @@ -0,0 +1,4 @@ +SELECT [b].[Id], [b].[BlogType], [b].[Url] +FROM [Blogs] AS [b] + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2017.MS,ProviderSpecific).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2017.MS,ProviderSpecific).sql new file mode 100644 index 00000000000..d005c63a292 --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2017.MS,ProviderSpecific).sql @@ -0,0 +1,4 @@ +SELECT [b].[Id], [b].[BlogType], [b].[Url] +FROM [Blogs] AS [b] + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2017.MS,RowByRow).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2017.MS,RowByRow).sql new file mode 100644 index 00000000000..d005c63a292 --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2017.MS,RowByRow).sql @@ -0,0 +1,4 @@ +SELECT [b].[Id], [b].[BlogType], [b].[Url] +FROM [Blogs] AS [b] + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InterceptorTests/LinqToDB.EntityFrameworkCore.Tests.InterceptorTests.TestEfCoreSideOfComboInterceptor(SqlServer.2017.MS).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InterceptorTests/LinqToDB.EntityFrameworkCore.Tests.InterceptorTests.TestEfCoreSideOfComboInterceptor(SqlServer.2017.MS).sql new file mode 100644 index 00000000000..550d60442c5 --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InterceptorTests/LinqToDB.EntityFrameworkCore.Tests.InterceptorTests.TestEfCoreSideOfComboInterceptor(SqlServer.2017.MS).sql @@ -0,0 +1,9 @@ +Parameters: +@__p_0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT TOP(@__p_0) [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductID] > 0 +ORDER BY [p].[ProductID] + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue117Test(SqlServer.2017.MS).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue117Test(SqlServer.2017.MS).sql new file mode 100644 index 00000000000..1e0723a91d2 --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue117Test(SqlServer.2017.MS).sql @@ -0,0 +1,9 @@ +Parameters: +@__userId_1='?' (DbType = Int32), @__userId_0='?' (DbType = Int32) + +SELECT [p].[Id] AS [PatentId], @__userId_1 AS [UserId] +FROM [Patents] AS [p] +LEFT JOIN [PatentAssessment] AS [p0] ON [p].[Id] = [p0].[PatentId] +WHERE [p0].[PatentId] IS NULL OR [p0].[TechnicalReviewerId] <> @__userId_0 OR [p0].[TechnicalReviewerId] IS NULL + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue73Test(SqlServer.2017.MS).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue73Test(SqlServer.2017.MS).sql new file mode 100644 index 00000000000..6a6908a5aa9 --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue73Test(SqlServer.2017.MS).sql @@ -0,0 +1,6 @@ +SELECT COALESCE([i0].[Name], N'') + N'>' + [i].[Name] +FROM [Issue73Entities] AS [i] +LEFT JOIN [Issue73Entities] AS [i0] ON [i].[ParentId] = [i0].[Id] +WHERE [i].[Name] = N'Name1_3' + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated(SqlServer.2017.MS).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated(SqlServer.2017.MS).sql new file mode 100644 index 00000000000..761b1ced8fe --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated(SqlServer.2017.MS).sql @@ -0,0 +1,10 @@ +Parameters: +p0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [l].[CategoryID], [l].[CategoryName], [l].[Description], [l].[IsDeleted], [l].[Picture] +FROM ( + SELECT * FROM [dbo].[Categories] WHERE CategoryId = @p0 +) AS [l] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated2(SqlServer.2017.MS).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated2(SqlServer.2017.MS).sql new file mode 100644 index 00000000000..4e7025136cc --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated2(SqlServer.2017.MS).sql @@ -0,0 +1,15 @@ +Parameters: +p0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [l0].[CategoryID], [l0].[CategoryName], [l0].[Description], [l0].[IsDeleted], [l0].[Picture] +FROM [Categories] AS [c] +CROSS JOIN ( + SELECT [l].[CategoryID], [l].[CategoryName], [l].[Description], [l].[IsDeleted], [l].[Picture] + FROM ( + SELECT * FROM [dbo].[Categories] WHERE CategoryId = @p0 + ) AS [l] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) +) AS [l0] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw(SqlServer.2017.MS).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw(SqlServer.2017.MS).sql new file mode 100644 index 00000000000..761b1ced8fe --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw(SqlServer.2017.MS).sql @@ -0,0 +1,10 @@ +Parameters: +p0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [l].[CategoryID], [l].[CategoryName], [l].[Description], [l].[IsDeleted], [l].[Picture] +FROM ( + SELECT * FROM [dbo].[Categories] WHERE CategoryId = @p0 +) AS [l] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw2(SqlServer.2017.MS).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw2(SqlServer.2017.MS).sql new file mode 100644 index 00000000000..4e7025136cc --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw2(SqlServer.2017.MS).sql @@ -0,0 +1,15 @@ +Parameters: +p0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [l0].[CategoryID], [l0].[CategoryName], [l0].[Description], [l0].[IsDeleted], [l0].[Picture] +FROM [Categories] AS [c] +CROSS JOIN ( + SELECT [l].[CategoryID], [l].[CategoryName], [l].[Description], [l].[IsDeleted], [l].[Picture] + FROM ( + SELECT * FROM [dbo].[Categories] WHERE CategoryId = @p0 + ) AS [l] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) +) AS [l0] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.NavigationProperties(SqlServer.2017.MS).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.NavigationProperties(SqlServer.2017.MS).sql new file mode 100644 index 00000000000..4787fb868ab --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.NavigationProperties(SqlServer.2017.MS).sql @@ -0,0 +1,24 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o1].[OrderID], [o1].[ProductID], [p0].[ProductID], [o3].[OrderId], [o3].[ProductId], [o3].[Quantity], [o1].[Quantity], [p0].[ProductName] +FROM [Orders] AS [o] +INNER JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Quantity] + FROM [Order Details] AS [o0] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [o1] ON [o].[OrderID] = [o1].[OrderID] +INNER JOIN ( + SELECT [p].[ProductID], [p].[ProductName] + FROM [Products] AS [p] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) +) AS [p0] ON [o1].[ProductID] = [p0].[ProductID] +LEFT JOIN ( + SELECT [o2].[OrderID] AS [OrderId], [o2].[ProductID] AS [ProductId], [o2].[Quantity] + FROM [Order Details] AS [o2] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o2].[IsDeleted] = CAST(0 AS bit) OR [o2].[IsDeleted] = CAST(0 AS bit) +) AS [o3] ON [p0].[ProductID] = [o3].[ProductId] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [o1].[OrderID], [o1].[ProductID], [p0].[ProductID], [o3].[OrderId] + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.2017.MS,False).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.2017.MS,False).sql new file mode 100644 index 00000000000..d971cbfab3d --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.2017.MS,False).sql @@ -0,0 +1,28 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%' + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%' + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT CASE + WHEN EXISTS ( + SELECT 1 + FROM [Products] AS [p] + WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%') THEN CAST(1 AS bit) + ELSE CAST(0 AS bit) +END + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.2017.MS,True).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.2017.MS,True).sql new file mode 100644 index 00000000000..d971cbfab3d --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.2017.MS,True).sql @@ -0,0 +1,28 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%' + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%' + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT CASE + WHEN EXISTS ( + SELECT 1 + FROM [Products] AS [p] + WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%') THEN CAST(1 AS bit) + ELSE CAST(0 AS bit) +END + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.2017.MS,False).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.2017.MS,False).sql new file mode 100644 index 00000000000..5c143463885 --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.2017.MS,False).sql @@ -0,0 +1,10 @@ +Parameters: +@p1='?' (DbType = Int32), @p2='?' (DbType = Int32), @p0='?' (DbType = Currency) + +SET IMPLICIT_TRANSACTIONS OFF; +SET NOCOUNT ON; +UPDATE [Order Details] SET [UnitPrice] = @p0 +OUTPUT 1 +WHERE [OrderID] = @p1 AND [ProductID] = @p2; + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.2017.MS,True).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.2017.MS,True).sql new file mode 100644 index 00000000000..5c143463885 --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.2017.MS,True).sql @@ -0,0 +1,10 @@ +Parameters: +@p1='?' (DbType = Int32), @p2='?' (DbType = Int32), @p0='?' (DbType = Currency) + +SET IMPLICIT_TRANSACTIONS OFF; +SET NOCOUNT ON; +UPDATE [Order Details] SET [UnitPrice] = @p0 +OUTPUT 1 +WHERE [OrderID] = @p1 AND [ProductID] = @p2; + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestCommandTimeout(SqlServer.2017.MS).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestCommandTimeout(SqlServer.2017.MS).sql new file mode 100644 index 00000000000..54eea14853c --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestCommandTimeout(SqlServer.2017.MS).sql @@ -0,0 +1,19 @@ +CREATE OR ALTER FUNCTION dbo.[ProcessLong] + ( + @secondsNumber int + ) + RETURNS int + AS + BEGIN + declare @startTime datetime = getutcdate() + while datediff(second, @startTime, getutcdate()) < @secondsNumber + begin + set @startTime = @startTime + end + return 1 + END + + +DROP FUNCTION IF EXISTS [dbo].[ProcessLong] + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.2017.MS,False).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.2017.MS,False).sql new file mode 100644 index 00000000000..26064712104 --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.2017.MS,False).sql @@ -0,0 +1,24 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [s].[OrderID], [s].[ProductID], [s].[Discount], [s].[IsDeleted], [s].[Quantity], [s].[UnitPrice], [s].[ProductID0], [s].[CategoryID], [s].[Discontinued], [s].[IsDeleted0], [s].[PeriodEnd], [s].[PeriodStart], [s].[ProductName], [s].[QuantityPerUnit], [s].[ReorderLevel], [s].[SupplierID], [s].[UnitPrice0], [s].[UnitsInStock], [s].[UnitsOnOrder], [s].[OrderID0], [s].[ProductID1], [s].[Discount0], [s].[IsDeleted1], [s].[Quantity0], [s].[UnitPrice1] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder], [o2].[OrderID] AS [OrderID0], [o2].[ProductID] AS [ProductID1], [o2].[Discount] AS [Discount0], [o2].[IsDeleted] AS [IsDeleted1], [o2].[Quantity] AS [Quantity0], [o2].[UnitPrice] AS [UnitPrice1] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + LEFT JOIN ( + SELECT [o1].[OrderID], [o1].[ProductID], [o1].[Discount], [o1].[IsDeleted], [o1].[Quantity], [o1].[UnitPrice] + FROM [Order Details] AS [o1] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o1].[IsDeleted] = CAST(0 AS bit) OR [o1].[IsDeleted] = CAST(0 AS bit) + ) AS [o2] ON [p0].[ProductID] = [o2].[ProductID] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [o].[OrderID] = [s].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [s].[OrderID], [s].[ProductID], [s].[ProductID0], [s].[OrderID0] + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.2017.MS,True).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.2017.MS,True).sql new file mode 100644 index 00000000000..26064712104 --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.2017.MS,True).sql @@ -0,0 +1,24 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [s].[OrderID], [s].[ProductID], [s].[Discount], [s].[IsDeleted], [s].[Quantity], [s].[UnitPrice], [s].[ProductID0], [s].[CategoryID], [s].[Discontinued], [s].[IsDeleted0], [s].[PeriodEnd], [s].[PeriodStart], [s].[ProductName], [s].[QuantityPerUnit], [s].[ReorderLevel], [s].[SupplierID], [s].[UnitPrice0], [s].[UnitsInStock], [s].[UnitsOnOrder], [s].[OrderID0], [s].[ProductID1], [s].[Discount0], [s].[IsDeleted1], [s].[Quantity0], [s].[UnitPrice1] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder], [o2].[OrderID] AS [OrderID0], [o2].[ProductID] AS [ProductID1], [o2].[Discount] AS [Discount0], [o2].[IsDeleted] AS [IsDeleted1], [o2].[Quantity] AS [Quantity0], [o2].[UnitPrice] AS [UnitPrice1] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + LEFT JOIN ( + SELECT [o1].[OrderID], [o1].[ProductID], [o1].[Discount], [o1].[IsDeleted], [o1].[Quantity], [o1].[UnitPrice] + FROM [Order Details] AS [o1] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o1].[IsDeleted] = CAST(0 AS bit) OR [o1].[IsDeleted] = CAST(0 AS bit) + ) AS [o2] ON [p0].[ProductID] = [o2].[ProductID] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [o].[OrderID] = [s].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [s].[OrderID], [s].[ProductID], [s].[ProductID0], [s].[OrderID0] + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.2017.MS,False).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.2017.MS,False).sql new file mode 100644 index 00000000000..ea7933460c5 --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.2017.MS,False).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [o].[OrderID], [s].[EmployeeID], [s].[TerritoryID], [s].[IsDeleted], [s].[TerritoryID0], [s].[IsDeleted0], [s].[RegionID], [s].[TerritoryDescription], [s0].[OrderID], [s0].[ProductID], [s0].[Discount], [s0].[IsDeleted], [s0].[Quantity], [s0].[UnitPrice], [s0].[ProductID0], [s0].[CategoryID], [s0].[Discontinued], [s0].[IsDeleted0], [s0].[PeriodEnd], [s0].[PeriodStart], [s0].[ProductName], [s0].[QuantityPerUnit], [s0].[ReorderLevel], [s0].[SupplierID], [s0].[UnitPrice0], [s0].[UnitsInStock], [s0].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted], [t0].[TerritoryID] AS [TerritoryID0], [t0].[IsDeleted] AS [IsDeleted0], [t0].[RegionID], [t0].[TerritoryDescription] + FROM [EmployeeTerritories] AS [e1] + INNER JOIN ( + SELECT [t].[TerritoryID], [t].[IsDeleted], [t].[RegionID], [t].[TerritoryDescription] + FROM [Territories] AS [t] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) + ) AS [t0] ON [e1].[TerritoryID] = [t0].[TerritoryID] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [e0].[EmployeeID] = [s].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_5 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s0] ON [o].[OrderID] = [s0].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [s].[EmployeeID], [s].[TerritoryID], [s].[TerritoryID0], [s0].[OrderID], [s0].[ProductID] + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.2017.MS,True).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.2017.MS,True).sql new file mode 100644 index 00000000000..ea7933460c5 --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.2017.MS,True).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [o].[OrderID], [s].[EmployeeID], [s].[TerritoryID], [s].[IsDeleted], [s].[TerritoryID0], [s].[IsDeleted0], [s].[RegionID], [s].[TerritoryDescription], [s0].[OrderID], [s0].[ProductID], [s0].[Discount], [s0].[IsDeleted], [s0].[Quantity], [s0].[UnitPrice], [s0].[ProductID0], [s0].[CategoryID], [s0].[Discontinued], [s0].[IsDeleted0], [s0].[PeriodEnd], [s0].[PeriodStart], [s0].[ProductName], [s0].[QuantityPerUnit], [s0].[ReorderLevel], [s0].[SupplierID], [s0].[UnitPrice0], [s0].[UnitsInStock], [s0].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted], [t0].[TerritoryID] AS [TerritoryID0], [t0].[IsDeleted] AS [IsDeleted0], [t0].[RegionID], [t0].[TerritoryDescription] + FROM [EmployeeTerritories] AS [e1] + INNER JOIN ( + SELECT [t].[TerritoryID], [t].[IsDeleted], [t].[RegionID], [t].[TerritoryDescription] + FROM [Territories] AS [t] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) + ) AS [t0] ON [e1].[TerritoryID] = [t0].[TerritoryID] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [e0].[EmployeeID] = [s].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_5 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s0] ON [o].[OrderID] = [s0].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [s].[EmployeeID], [s].[TerritoryID], [s].[TerritoryID0], [s0].[OrderID], [s0].[ProductID] + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.2017.MS,False).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.2017.MS,False).sql new file mode 100644 index 00000000000..1b9ca7c0743 --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.2017.MS,False).sql @@ -0,0 +1,13 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy], [e1].[EmployeeID], [e1].[Address], [e1].[BirthDate], [e1].[City], [e1].[Country], [e1].[Extension], [e1].[FirstName], [e1].[HireDate], [e1].[HomePhone], [e1].[IsDeleted], [e1].[LastName], [e1].[Notes], [e1].[Photo], [e1].[PhotoPath], [e1].[PostalCode], [e1].[Region], [e1].[ReportsTo], [e1].[Title], [e1].[TitleOfCourtesy] +FROM [Employees] AS [e] +LEFT JOIN ( + SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy] + FROM [Employees] AS [e0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) +) AS [e1] ON [e].[ReportsTo] = [e1].[EmployeeID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.2017.MS,True).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.2017.MS,True).sql new file mode 100644 index 00000000000..1b9ca7c0743 --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.2017.MS,True).sql @@ -0,0 +1,13 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy], [e1].[EmployeeID], [e1].[Address], [e1].[BirthDate], [e1].[City], [e1].[Country], [e1].[Extension], [e1].[FirstName], [e1].[HireDate], [e1].[HomePhone], [e1].[IsDeleted], [e1].[LastName], [e1].[Notes], [e1].[Photo], [e1].[PhotoPath], [e1].[PostalCode], [e1].[Region], [e1].[ReportsTo], [e1].[Title], [e1].[TitleOfCourtesy] +FROM [Employees] AS [e] +LEFT JOIN ( + SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy] + FROM [Employees] AS [e0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) +) AS [e1] ON [e].[ReportsTo] = [e1].[EmployeeID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.2017.MS,False).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.2017.MS,False).sql new file mode 100644 index 00000000000..3180e5e2124 --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.2017.MS,False).sql @@ -0,0 +1,18 @@ +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[IsDeleted], [o].[Quantity], [o].[UnitPrice] +FROM [Products] AS [p] +INNER JOIN [Order Details] AS [o] ON [p].[ProductID] = [o].[ProductID] + + +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice] +FROM [Products] AS [p] +INNER JOIN ( + SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[IsDeleted], [o].[Quantity], [o].[UnitPrice] + FROM [Order Details] AS [o] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +) AS [o0] ON [p].[ProductID] = [o0].[ProductID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.2017.MS,True).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.2017.MS,True).sql new file mode 100644 index 00000000000..3180e5e2124 --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.2017.MS,True).sql @@ -0,0 +1,18 @@ +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[IsDeleted], [o].[Quantity], [o].[UnitPrice] +FROM [Products] AS [p] +INNER JOIN [Order Details] AS [o] ON [p].[ProductID] = [o].[ProductID] + + +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice] +FROM [Products] AS [p] +INNER JOIN ( + SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[IsDeleted], [o].[Quantity], [o].[UnitPrice] + FROM [Order Details] AS [o] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +) AS [o0] ON [p].[ProductID] = [o0].[ProductID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.2017.MS,False).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.2017.MS,False).sql new file mode 100644 index 00000000000..d17a1454daa --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.2017.MS,False).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [s].[EmployeeID], [s].[TerritoryID], [s].[IsDeleted], [s].[TerritoryID0], [s].[IsDeleted0], [s].[RegionID], [s].[TerritoryDescription], [s0].[OrderID], [s0].[ProductID], [s0].[Discount], [s0].[IsDeleted], [s0].[Quantity], [s0].[UnitPrice], [s0].[ProductID0], [s0].[CategoryID], [s0].[Discontinued], [s0].[IsDeleted0], [s0].[PeriodEnd], [s0].[PeriodStart], [s0].[ProductName], [s0].[QuantityPerUnit], [s0].[ReorderLevel], [s0].[SupplierID], [s0].[UnitPrice0], [s0].[UnitsInStock], [s0].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted], [t0].[TerritoryID] AS [TerritoryID0], [t0].[IsDeleted] AS [IsDeleted0], [t0].[RegionID], [t0].[TerritoryDescription] + FROM [EmployeeTerritories] AS [e1] + INNER JOIN ( + SELECT [t].[TerritoryID], [t].[IsDeleted], [t].[RegionID], [t].[TerritoryDescription] + FROM [Territories] AS [t] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) + ) AS [t0] ON [e1].[TerritoryID] = [t0].[TerritoryID] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [e0].[EmployeeID] = [s].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_5 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s0] ON [o].[OrderID] = [s0].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [s].[EmployeeID], [s].[TerritoryID], [s].[TerritoryID0], [s0].[OrderID], [s0].[ProductID] + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.2017.MS,True).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.2017.MS,True).sql new file mode 100644 index 00000000000..d17a1454daa --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.2017.MS,True).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [s].[EmployeeID], [s].[TerritoryID], [s].[IsDeleted], [s].[TerritoryID0], [s].[IsDeleted0], [s].[RegionID], [s].[TerritoryDescription], [s0].[OrderID], [s0].[ProductID], [s0].[Discount], [s0].[IsDeleted], [s0].[Quantity], [s0].[UnitPrice], [s0].[ProductID0], [s0].[CategoryID], [s0].[Discontinued], [s0].[IsDeleted0], [s0].[PeriodEnd], [s0].[PeriodStart], [s0].[ProductName], [s0].[QuantityPerUnit], [s0].[ReorderLevel], [s0].[SupplierID], [s0].[UnitPrice0], [s0].[UnitsInStock], [s0].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted], [t0].[TerritoryID] AS [TerritoryID0], [t0].[IsDeleted] AS [IsDeleted0], [t0].[RegionID], [t0].[TerritoryDescription] + FROM [EmployeeTerritories] AS [e1] + INNER JOIN ( + SELECT [t].[TerritoryID], [t].[IsDeleted], [t].[RegionID], [t].[TerritoryDescription] + FROM [Territories] AS [t] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) + ) AS [t0] ON [e1].[TerritoryID] = [t0].[TerritoryID] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [e0].[EmployeeID] = [s].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_5 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s0] ON [o].[OrderID] = [s0].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [s].[EmployeeID], [s].[TerritoryID], [s].[TerritoryID0], [s0].[OrderID], [s0].[ProductID] + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.2017.MS,False).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.2017.MS,False).sql new file mode 100644 index 00000000000..def257d2102 --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.2017.MS,False).sql @@ -0,0 +1,29 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [e2].[EmployeeID], [e2].[TerritoryID], [e2].[IsDeleted], [s].[OrderID], [s].[ProductID], [s].[Discount], [s].[IsDeleted], [s].[Quantity], [s].[UnitPrice], [s].[ProductID0], [s].[CategoryID], [s].[Discontinued], [s].[IsDeleted0], [s].[PeriodEnd], [s].[PeriodStart], [s].[ProductName], [s].[QuantityPerUnit], [s].[ReorderLevel], [s].[SupplierID], [s].[UnitPrice0], [s].[UnitsInStock], [s].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted] + FROM [EmployeeTerritories] AS [e1] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [e2] ON [e0].[EmployeeID] = [e2].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [o].[OrderID] = [s].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [e2].[EmployeeID], [e2].[TerritoryID], [s].[OrderID], [s].[ProductID] + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.2017.MS,True).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.2017.MS,True).sql new file mode 100644 index 00000000000..def257d2102 --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.2017.MS,True).sql @@ -0,0 +1,29 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [e2].[EmployeeID], [e2].[TerritoryID], [e2].[IsDeleted], [s].[OrderID], [s].[ProductID], [s].[Discount], [s].[IsDeleted], [s].[Quantity], [s].[UnitPrice], [s].[ProductID0], [s].[CategoryID], [s].[Discontinued], [s].[IsDeleted0], [s].[PeriodEnd], [s].[PeriodStart], [s].[ProductName], [s].[QuantityPerUnit], [s].[ReorderLevel], [s].[SupplierID], [s].[UnitPrice0], [s].[UnitsInStock], [s].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted] + FROM [EmployeeTerritories] AS [e1] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [e2] ON [e0].[EmployeeID] = [e2].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [o].[OrderID] = [s].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [e2].[EmployeeID], [e2].[TerritoryID], [s].[OrderID], [s].[ProductID] + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.2017.MS,False).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.2017.MS,False).sql new file mode 100644 index 00000000000..76f07dd62df --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.2017.MS,False).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT [p].[ProductName], [p].[ProductID], [s1].[Discount], [s1].[OrderID], [s1].[CustomerID], [s1].[EmployeeID], [s1].[Freight], [s1].[IsDeleted], [s1].[OrderDate], [s1].[RequiredDate], [s1].[ShipAddress], [s1].[ShipCity], [s1].[ShipCountry], [s1].[ShipName], [s1].[ShipPostalCode], [s1].[ShipRegion], [s1].[ShipVia], [s1].[ShippedDate], [s1].[OrderID0], [s1].[ProductID], [s1].[ProductID0], [s1].[SupplierID], [s1].[ProductID1], [s1].[CategoryID], [s1].[Discontinued], [s1].[IsDeleted0], [s1].[PeriodEnd], [s1].[PeriodStart], [s1].[ProductName], [s1].[QuantityPerUnit], [s1].[ReorderLevel], [s1].[SupplierID0], [s1].[UnitPrice], [s1].[UnitsInStock], [s1].[UnitsOnOrder] +FROM [Products] AS [p] +LEFT JOIN ( + SELECT [o].[Discount], [o1].[OrderID], [o1].[CustomerID], [o1].[EmployeeID], [o1].[Freight], [o1].[IsDeleted], [o1].[OrderDate], [o1].[RequiredDate], [o1].[ShipAddress], [o1].[ShipCity], [o1].[ShipCountry], [o1].[ShipName], [o1].[ShipPostalCode], [o1].[ShipRegion], [o1].[ShipVia], [o1].[ShippedDate], [o].[OrderID] AS [OrderID0], [o].[ProductID], [p1].[ProductID] AS [ProductID0], [s0].[SupplierID], [p3].[ProductID] AS [ProductID1], [p3].[CategoryID], [p3].[Discontinued], [p3].[IsDeleted] AS [IsDeleted0], [p3].[PeriodEnd], [p3].[PeriodStart], [p3].[ProductName], [p3].[QuantityPerUnit], [p3].[ReorderLevel], [p3].[SupplierID] AS [SupplierID0], [p3].[UnitPrice], [p3].[UnitsInStock], [p3].[UnitsOnOrder] + FROM [Order Details] AS [o] + INNER JOIN ( + SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[Freight], [o0].[IsDeleted], [o0].[OrderDate], [o0].[RequiredDate], [o0].[ShipAddress], [o0].[ShipCity], [o0].[ShipCountry], [o0].[ShipName], [o0].[ShipPostalCode], [o0].[ShipRegion], [o0].[ShipVia], [o0].[ShippedDate] + FROM [Orders] AS [o0] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) + ) AS [o1] ON [o].[OrderID] = [o1].[OrderID] + INNER JOIN ( + SELECT [p0].[ProductID], [p0].[SupplierID] + FROM [Products] AS [p0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) + ) AS [p1] ON [o].[ProductID] = [p1].[ProductID] + LEFT JOIN ( + SELECT [s].[SupplierID] + FROM [Suppliers] AS [s] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [s].[IsDeleted] = CAST(0 AS bit) OR [s].[IsDeleted] = CAST(0 AS bit) + ) AS [s0] ON [p1].[SupplierID] = [s0].[SupplierID] + LEFT JOIN ( + SELECT [p2].[ProductID], [p2].[CategoryID], [p2].[Discontinued], [p2].[IsDeleted], [p2].[PeriodEnd], [p2].[PeriodStart], [p2].[ProductName], [p2].[QuantityPerUnit], [p2].[ReorderLevel], [p2].[SupplierID], [p2].[UnitPrice], [p2].[UnitsInStock], [p2].[UnitsOnOrder] + FROM [Products] AS [p2] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p2].[IsDeleted] = CAST(0 AS bit) OR [p2].[IsDeleted] = CAST(0 AS bit) + ) AS [p3] ON [s0].[SupplierID] = [p3].[SupplierID] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +) AS [s1] ON [p].[ProductID] = [s1].[ProductID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) +ORDER BY [p].[ProductID], [s1].[OrderID0], [s1].[ProductID], [s1].[OrderID], [s1].[ProductID0], [s1].[SupplierID] + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.2017.MS,True).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.2017.MS,True).sql new file mode 100644 index 00000000000..76f07dd62df --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.2017.MS,True).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT [p].[ProductName], [p].[ProductID], [s1].[Discount], [s1].[OrderID], [s1].[CustomerID], [s1].[EmployeeID], [s1].[Freight], [s1].[IsDeleted], [s1].[OrderDate], [s1].[RequiredDate], [s1].[ShipAddress], [s1].[ShipCity], [s1].[ShipCountry], [s1].[ShipName], [s1].[ShipPostalCode], [s1].[ShipRegion], [s1].[ShipVia], [s1].[ShippedDate], [s1].[OrderID0], [s1].[ProductID], [s1].[ProductID0], [s1].[SupplierID], [s1].[ProductID1], [s1].[CategoryID], [s1].[Discontinued], [s1].[IsDeleted0], [s1].[PeriodEnd], [s1].[PeriodStart], [s1].[ProductName], [s1].[QuantityPerUnit], [s1].[ReorderLevel], [s1].[SupplierID0], [s1].[UnitPrice], [s1].[UnitsInStock], [s1].[UnitsOnOrder] +FROM [Products] AS [p] +LEFT JOIN ( + SELECT [o].[Discount], [o1].[OrderID], [o1].[CustomerID], [o1].[EmployeeID], [o1].[Freight], [o1].[IsDeleted], [o1].[OrderDate], [o1].[RequiredDate], [o1].[ShipAddress], [o1].[ShipCity], [o1].[ShipCountry], [o1].[ShipName], [o1].[ShipPostalCode], [o1].[ShipRegion], [o1].[ShipVia], [o1].[ShippedDate], [o].[OrderID] AS [OrderID0], [o].[ProductID], [p1].[ProductID] AS [ProductID0], [s0].[SupplierID], [p3].[ProductID] AS [ProductID1], [p3].[CategoryID], [p3].[Discontinued], [p3].[IsDeleted] AS [IsDeleted0], [p3].[PeriodEnd], [p3].[PeriodStart], [p3].[ProductName], [p3].[QuantityPerUnit], [p3].[ReorderLevel], [p3].[SupplierID] AS [SupplierID0], [p3].[UnitPrice], [p3].[UnitsInStock], [p3].[UnitsOnOrder] + FROM [Order Details] AS [o] + INNER JOIN ( + SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[Freight], [o0].[IsDeleted], [o0].[OrderDate], [o0].[RequiredDate], [o0].[ShipAddress], [o0].[ShipCity], [o0].[ShipCountry], [o0].[ShipName], [o0].[ShipPostalCode], [o0].[ShipRegion], [o0].[ShipVia], [o0].[ShippedDate] + FROM [Orders] AS [o0] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) + ) AS [o1] ON [o].[OrderID] = [o1].[OrderID] + INNER JOIN ( + SELECT [p0].[ProductID], [p0].[SupplierID] + FROM [Products] AS [p0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) + ) AS [p1] ON [o].[ProductID] = [p1].[ProductID] + LEFT JOIN ( + SELECT [s].[SupplierID] + FROM [Suppliers] AS [s] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [s].[IsDeleted] = CAST(0 AS bit) OR [s].[IsDeleted] = CAST(0 AS bit) + ) AS [s0] ON [p1].[SupplierID] = [s0].[SupplierID] + LEFT JOIN ( + SELECT [p2].[ProductID], [p2].[CategoryID], [p2].[Discontinued], [p2].[IsDeleted], [p2].[PeriodEnd], [p2].[PeriodStart], [p2].[ProductName], [p2].[QuantityPerUnit], [p2].[ReorderLevel], [p2].[SupplierID], [p2].[UnitPrice], [p2].[UnitsInStock], [p2].[UnitsOnOrder] + FROM [Products] AS [p2] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p2].[IsDeleted] = CAST(0 AS bit) OR [p2].[IsDeleted] = CAST(0 AS bit) + ) AS [p3] ON [s0].[SupplierID] = [p3].[SupplierID] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +) AS [s1] ON [p].[ProductID] = [s1].[ProductID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) +ORDER BY [p].[ProductID], [s1].[OrderID0], [s1].[ProductID], [s1].[OrderID], [s1].[ProductID0], [s1].[SupplierID] + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.2017.MS,False).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.2017.MS,False).sql new file mode 100644 index 00000000000..5e8fe75715c --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.2017.MS,False).sql @@ -0,0 +1,20 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [p1].[ProductID], [p1].[CategoryID], [p1].[Discontinued], [p1].[IsDeleted], [p1].[PeriodEnd], [p1].[PeriodStart], [p1].[ProductName], [p1].[QuantityPerUnit], [p1].[ReorderLevel], [p1].[SupplierID], [p1].[UnitPrice], [p1].[UnitsInStock], [p1].[UnitsOnOrder] +FROM [Products] AS [p] +CROSS JOIN ( + SELECT [p0].[ProductID], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Products] AS [p0] + WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit)) AND ( + SELECT COUNT(*) + FROM [Order Details] AS [o0] + WHERE (@__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit)) AND [p0].[ProductID] = [o0].[ProductID]) > 0 +) AS [p1] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND ( + SELECT COUNT(*) + FROM [Order Details] AS [o] + WHERE (@__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductID] = [o].[ProductID]) > 0 AND [p].[ProductID] = [p1].[ProductID] +ORDER BY [p].[ProductID] + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.2017.MS,True).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.2017.MS,True).sql new file mode 100644 index 00000000000..5e8fe75715c --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.2017.MS,True).sql @@ -0,0 +1,20 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [p1].[ProductID], [p1].[CategoryID], [p1].[Discontinued], [p1].[IsDeleted], [p1].[PeriodEnd], [p1].[PeriodStart], [p1].[ProductName], [p1].[QuantityPerUnit], [p1].[ReorderLevel], [p1].[SupplierID], [p1].[UnitPrice], [p1].[UnitsInStock], [p1].[UnitsOnOrder] +FROM [Products] AS [p] +CROSS JOIN ( + SELECT [p0].[ProductID], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Products] AS [p0] + WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit)) AND ( + SELECT COUNT(*) + FROM [Order Details] AS [o0] + WHERE (@__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit)) AND [p0].[ProductID] = [o0].[ProductID]) > 0 +) AS [p1] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND ( + SELECT COUNT(*) + FROM [Order Details] AS [o] + WHERE (@__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductID] = [o].[ProductID]) > 0 AND [p].[ProductID] = [p1].[ProductID] +ORDER BY [p].[ProductID] + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.2017.MS,False).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.2017.MS,False).sql new file mode 100644 index 00000000000..03ff17e1f17 --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.2017.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__test_0='?' (DbType = Int32) + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] +FROM [Employees] AS [e] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit)) AND [e].[EmployeeID] = @__test_0 + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.2017.MS,True).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.2017.MS,True).sql new file mode 100644 index 00000000000..03ff17e1f17 --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.2017.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__test_0='?' (DbType = Int32) + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] +FROM [Employees] AS [e] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit)) AND [e].[EmployeeID] = @__test_0 + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.2017.MS,False).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.2017.MS,False).sql new file mode 100644 index 00000000000..e047dc4281d --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.2017.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT TOP(1) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[IsDeleted], [c].[Phone], [c].[PostalCode], [c].[Region] +FROM [Customers] AS [c] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.2017.MS,True).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.2017.MS,True).sql new file mode 100644 index 00000000000..e047dc4281d --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.2017.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT TOP(1) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[IsDeleted], [c].[Phone], [c].[PostalCode], [c].[Region] +FROM [Customers] AS [c] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.2017.MS,False).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.2017.MS,False).sql new file mode 100644 index 00000000000..1d6793b0b8c --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.2017.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[QuantityPerUnit] AS [Quantity] +FROM [Products] AS [p] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.2017.MS,True).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.2017.MS,True).sql new file mode 100644 index 00000000000..1d6793b0b8c --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.2017.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[QuantityPerUnit] AS [Quantity] +FROM [Products] AS [p] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.2017.MS,False).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.2017.MS,False).sql new file mode 100644 index 00000000000..5853efae690 --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.2017.MS,False).sql @@ -0,0 +1,15 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +-- Tagged query + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy], [e1].[EmployeeID], [e1].[Address], [e1].[BirthDate], [e1].[City], [e1].[Country], [e1].[Extension], [e1].[FirstName], [e1].[HireDate], [e1].[HomePhone], [e1].[IsDeleted], [e1].[LastName], [e1].[Notes], [e1].[Photo], [e1].[PhotoPath], [e1].[PostalCode], [e1].[Region], [e1].[ReportsTo], [e1].[Title], [e1].[TitleOfCourtesy] +FROM [Employees] AS [e] +LEFT JOIN ( + SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy] + FROM [Employees] AS [e0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) +) AS [e1] ON [e].[ReportsTo] = [e1].[EmployeeID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.2017.MS,True).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.2017.MS,True).sql new file mode 100644 index 00000000000..5853efae690 --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.2017.MS,True).sql @@ -0,0 +1,15 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +-- Tagged query + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy], [e1].[EmployeeID], [e1].[Address], [e1].[BirthDate], [e1].[City], [e1].[Country], [e1].[Extension], [e1].[FirstName], [e1].[HireDate], [e1].[HomePhone], [e1].[IsDeleted], [e1].[LastName], [e1].[Notes], [e1].[Photo], [e1].[PhotoPath], [e1].[PostalCode], [e1].[Region], [e1].[ReportsTo], [e1].[Title], [e1].[TitleOfCourtesy] +FROM [Employees] AS [e] +LEFT JOIN ( + SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy] + FROM [Employees] AS [e0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) +) AS [e1] ON [e].[ReportsTo] = [e1].[EmployeeID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.2017.MS,False).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.2017.MS,False).sql new file mode 100644 index 00000000000..52ce94a469e --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.2017.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT MAX([p].[QuantityPerUnit]) +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'U%' + + diff --git a/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.2017.MS,True).sql b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.2017.MS,True).sql new file mode 100644 index 00000000000..52ce94a469e --- /dev/null +++ b/SqlServer.2017.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.2017.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT MAX([p].[QuantityPerUnit]) +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'U%' + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ConvertorTests/LinqToDB.EntityFrameworkCore.Tests.ConvertorTests.TestToList(SqlServer.2019.MS).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ConvertorTests/LinqToDB.EntityFrameworkCore.Tests.ConvertorTests.TestToList(SqlServer.2019.MS).sql new file mode 100644 index 00000000000..4509e56882e --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ConvertorTests/LinqToDB.EntityFrameworkCore.Tests.ConvertorTests.TestToList(SqlServer.2019.MS).sql @@ -0,0 +1,5 @@ +SELECT [s].[Id], [s].[Code], [s].[IsDeleted], [s].[Name], [s].[PermanentId] +FROM [Subdivisions] AS [s] +WHERE CAST([s].[Id] AS bigint) = CAST(1 AS bigint) + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestAmbiguousProperties(SqlServer.2019.MS).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestAmbiguousProperties(SqlServer.2019.MS).sql new file mode 100644 index 00000000000..3c073d8eed0 --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestAmbiguousProperties(SqlServer.2019.MS).sql @@ -0,0 +1,5 @@ +SELECT [w].[Id], [w].[Value] +FROM [WithDuplicateProperties] AS [w] +WHERE [w].[Value] = 1 + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestInheritance(SqlServer.2019.MS).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestInheritance(SqlServer.2019.MS).sql new file mode 100644 index 00000000000..40314a1747b --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestInheritance(SqlServer.2019.MS).sql @@ -0,0 +1,17 @@ +Parameters: +@p0='?' (Size = 21), @p1='?' (Size = 21), @p2='?' (Size = 21), @p3='?' (Size = 21), @p4='?' (Size = 21) + +SET IMPLICIT_TRANSACTIONS OFF; +SET NOCOUNT ON; +MERGE [WithInheritance] USING ( +VALUES (@p0, 0), +(@p1, 1), +(@p2, 2), +(@p3, 3), +(@p4, 4)) AS i ([Discriminator], _Position) ON 1=0 +WHEN NOT MATCHED THEN +INSERT ([Discriminator]) +VALUES (i.[Discriminator]) +OUTPUT INSERTED.[Id], i._Position; + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestUIntTable(SqlServer.2019.MS).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestUIntTable(SqlServer.2019.MS).sql new file mode 100644 index 00000000000..1c910246616 --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestUIntTable(SqlServer.2019.MS).sql @@ -0,0 +1,10 @@ +Parameters: +@p0='?' (DbType = Int32), @p1='?' (DbType = Int32), @p2='?' (DbType = Int64), @p3='?' (DbType = Int64), @p4='?' (Precision = 20) (DbType = Decimal), @p5='?' (Precision = 20) (DbType = Decimal) + +SET IMPLICIT_TRANSACTIONS OFF; +SET NOCOUNT ON; +INSERT INTO [UIntTable] ([Field16], [Field16N], [Field32], [Field32N], [Field64], [Field64N]) +OUTPUT INSERTED.[ID] +VALUES (@p0, @p1, @p2, @p3, @p4, @p5); + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2019.MS,Default).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2019.MS,Default).sql new file mode 100644 index 00000000000..d005c63a292 --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2019.MS,Default).sql @@ -0,0 +1,4 @@ +SELECT [b].[Id], [b].[BlogType], [b].[Url] +FROM [Blogs] AS [b] + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2019.MS,MultipleRows).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2019.MS,MultipleRows).sql new file mode 100644 index 00000000000..d005c63a292 --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2019.MS,MultipleRows).sql @@ -0,0 +1,4 @@ +SELECT [b].[Id], [b].[BlogType], [b].[Url] +FROM [Blogs] AS [b] + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2019.MS,ProviderSpecific).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2019.MS,ProviderSpecific).sql new file mode 100644 index 00000000000..d005c63a292 --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2019.MS,ProviderSpecific).sql @@ -0,0 +1,4 @@ +SELECT [b].[Id], [b].[BlogType], [b].[Url] +FROM [Blogs] AS [b] + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2019.MS,RowByRow).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2019.MS,RowByRow).sql new file mode 100644 index 00000000000..d005c63a292 --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2019.MS,RowByRow).sql @@ -0,0 +1,4 @@ +SELECT [b].[Id], [b].[BlogType], [b].[Url] +FROM [Blogs] AS [b] + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InterceptorTests/LinqToDB.EntityFrameworkCore.Tests.InterceptorTests.TestEfCoreSideOfComboInterceptor(SqlServer.2019.MS).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InterceptorTests/LinqToDB.EntityFrameworkCore.Tests.InterceptorTests.TestEfCoreSideOfComboInterceptor(SqlServer.2019.MS).sql new file mode 100644 index 00000000000..550d60442c5 --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InterceptorTests/LinqToDB.EntityFrameworkCore.Tests.InterceptorTests.TestEfCoreSideOfComboInterceptor(SqlServer.2019.MS).sql @@ -0,0 +1,9 @@ +Parameters: +@__p_0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT TOP(@__p_0) [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductID] > 0 +ORDER BY [p].[ProductID] + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue117Test(SqlServer.2019.MS).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue117Test(SqlServer.2019.MS).sql new file mode 100644 index 00000000000..1e0723a91d2 --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue117Test(SqlServer.2019.MS).sql @@ -0,0 +1,9 @@ +Parameters: +@__userId_1='?' (DbType = Int32), @__userId_0='?' (DbType = Int32) + +SELECT [p].[Id] AS [PatentId], @__userId_1 AS [UserId] +FROM [Patents] AS [p] +LEFT JOIN [PatentAssessment] AS [p0] ON [p].[Id] = [p0].[PatentId] +WHERE [p0].[PatentId] IS NULL OR [p0].[TechnicalReviewerId] <> @__userId_0 OR [p0].[TechnicalReviewerId] IS NULL + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue73Test(SqlServer.2019.MS).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue73Test(SqlServer.2019.MS).sql new file mode 100644 index 00000000000..6a6908a5aa9 --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue73Test(SqlServer.2019.MS).sql @@ -0,0 +1,6 @@ +SELECT COALESCE([i0].[Name], N'') + N'>' + [i].[Name] +FROM [Issue73Entities] AS [i] +LEFT JOIN [Issue73Entities] AS [i0] ON [i].[ParentId] = [i0].[Id] +WHERE [i].[Name] = N'Name1_3' + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated(SqlServer.2019.MS).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated(SqlServer.2019.MS).sql new file mode 100644 index 00000000000..761b1ced8fe --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated(SqlServer.2019.MS).sql @@ -0,0 +1,10 @@ +Parameters: +p0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [l].[CategoryID], [l].[CategoryName], [l].[Description], [l].[IsDeleted], [l].[Picture] +FROM ( + SELECT * FROM [dbo].[Categories] WHERE CategoryId = @p0 +) AS [l] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated2(SqlServer.2019.MS).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated2(SqlServer.2019.MS).sql new file mode 100644 index 00000000000..4e7025136cc --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated2(SqlServer.2019.MS).sql @@ -0,0 +1,15 @@ +Parameters: +p0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [l0].[CategoryID], [l0].[CategoryName], [l0].[Description], [l0].[IsDeleted], [l0].[Picture] +FROM [Categories] AS [c] +CROSS JOIN ( + SELECT [l].[CategoryID], [l].[CategoryName], [l].[Description], [l].[IsDeleted], [l].[Picture] + FROM ( + SELECT * FROM [dbo].[Categories] WHERE CategoryId = @p0 + ) AS [l] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) +) AS [l0] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw(SqlServer.2019.MS).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw(SqlServer.2019.MS).sql new file mode 100644 index 00000000000..761b1ced8fe --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw(SqlServer.2019.MS).sql @@ -0,0 +1,10 @@ +Parameters: +p0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [l].[CategoryID], [l].[CategoryName], [l].[Description], [l].[IsDeleted], [l].[Picture] +FROM ( + SELECT * FROM [dbo].[Categories] WHERE CategoryId = @p0 +) AS [l] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw2(SqlServer.2019.MS).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw2(SqlServer.2019.MS).sql new file mode 100644 index 00000000000..4e7025136cc --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw2(SqlServer.2019.MS).sql @@ -0,0 +1,15 @@ +Parameters: +p0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [l0].[CategoryID], [l0].[CategoryName], [l0].[Description], [l0].[IsDeleted], [l0].[Picture] +FROM [Categories] AS [c] +CROSS JOIN ( + SELECT [l].[CategoryID], [l].[CategoryName], [l].[Description], [l].[IsDeleted], [l].[Picture] + FROM ( + SELECT * FROM [dbo].[Categories] WHERE CategoryId = @p0 + ) AS [l] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) +) AS [l0] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.NavigationProperties(SqlServer.2019.MS).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.NavigationProperties(SqlServer.2019.MS).sql new file mode 100644 index 00000000000..4787fb868ab --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.NavigationProperties(SqlServer.2019.MS).sql @@ -0,0 +1,24 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o1].[OrderID], [o1].[ProductID], [p0].[ProductID], [o3].[OrderId], [o3].[ProductId], [o3].[Quantity], [o1].[Quantity], [p0].[ProductName] +FROM [Orders] AS [o] +INNER JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Quantity] + FROM [Order Details] AS [o0] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [o1] ON [o].[OrderID] = [o1].[OrderID] +INNER JOIN ( + SELECT [p].[ProductID], [p].[ProductName] + FROM [Products] AS [p] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) +) AS [p0] ON [o1].[ProductID] = [p0].[ProductID] +LEFT JOIN ( + SELECT [o2].[OrderID] AS [OrderId], [o2].[ProductID] AS [ProductId], [o2].[Quantity] + FROM [Order Details] AS [o2] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o2].[IsDeleted] = CAST(0 AS bit) OR [o2].[IsDeleted] = CAST(0 AS bit) +) AS [o3] ON [p0].[ProductID] = [o3].[ProductId] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [o1].[OrderID], [o1].[ProductID], [p0].[ProductID], [o3].[OrderId] + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.2019.MS,False).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.2019.MS,False).sql new file mode 100644 index 00000000000..d971cbfab3d --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.2019.MS,False).sql @@ -0,0 +1,28 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%' + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%' + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT CASE + WHEN EXISTS ( + SELECT 1 + FROM [Products] AS [p] + WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%') THEN CAST(1 AS bit) + ELSE CAST(0 AS bit) +END + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.2019.MS,True).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.2019.MS,True).sql new file mode 100644 index 00000000000..d971cbfab3d --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.2019.MS,True).sql @@ -0,0 +1,28 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%' + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%' + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT CASE + WHEN EXISTS ( + SELECT 1 + FROM [Products] AS [p] + WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%') THEN CAST(1 AS bit) + ELSE CAST(0 AS bit) +END + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.2019.MS,False).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.2019.MS,False).sql new file mode 100644 index 00000000000..5c143463885 --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.2019.MS,False).sql @@ -0,0 +1,10 @@ +Parameters: +@p1='?' (DbType = Int32), @p2='?' (DbType = Int32), @p0='?' (DbType = Currency) + +SET IMPLICIT_TRANSACTIONS OFF; +SET NOCOUNT ON; +UPDATE [Order Details] SET [UnitPrice] = @p0 +OUTPUT 1 +WHERE [OrderID] = @p1 AND [ProductID] = @p2; + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.2019.MS,True).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.2019.MS,True).sql new file mode 100644 index 00000000000..5c143463885 --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.2019.MS,True).sql @@ -0,0 +1,10 @@ +Parameters: +@p1='?' (DbType = Int32), @p2='?' (DbType = Int32), @p0='?' (DbType = Currency) + +SET IMPLICIT_TRANSACTIONS OFF; +SET NOCOUNT ON; +UPDATE [Order Details] SET [UnitPrice] = @p0 +OUTPUT 1 +WHERE [OrderID] = @p1 AND [ProductID] = @p2; + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestCommandTimeout(SqlServer.2019.MS).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestCommandTimeout(SqlServer.2019.MS).sql new file mode 100644 index 00000000000..54eea14853c --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestCommandTimeout(SqlServer.2019.MS).sql @@ -0,0 +1,19 @@ +CREATE OR ALTER FUNCTION dbo.[ProcessLong] + ( + @secondsNumber int + ) + RETURNS int + AS + BEGIN + declare @startTime datetime = getutcdate() + while datediff(second, @startTime, getutcdate()) < @secondsNumber + begin + set @startTime = @startTime + end + return 1 + END + + +DROP FUNCTION IF EXISTS [dbo].[ProcessLong] + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.2019.MS,False).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.2019.MS,False).sql new file mode 100644 index 00000000000..26064712104 --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.2019.MS,False).sql @@ -0,0 +1,24 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [s].[OrderID], [s].[ProductID], [s].[Discount], [s].[IsDeleted], [s].[Quantity], [s].[UnitPrice], [s].[ProductID0], [s].[CategoryID], [s].[Discontinued], [s].[IsDeleted0], [s].[PeriodEnd], [s].[PeriodStart], [s].[ProductName], [s].[QuantityPerUnit], [s].[ReorderLevel], [s].[SupplierID], [s].[UnitPrice0], [s].[UnitsInStock], [s].[UnitsOnOrder], [s].[OrderID0], [s].[ProductID1], [s].[Discount0], [s].[IsDeleted1], [s].[Quantity0], [s].[UnitPrice1] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder], [o2].[OrderID] AS [OrderID0], [o2].[ProductID] AS [ProductID1], [o2].[Discount] AS [Discount0], [o2].[IsDeleted] AS [IsDeleted1], [o2].[Quantity] AS [Quantity0], [o2].[UnitPrice] AS [UnitPrice1] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + LEFT JOIN ( + SELECT [o1].[OrderID], [o1].[ProductID], [o1].[Discount], [o1].[IsDeleted], [o1].[Quantity], [o1].[UnitPrice] + FROM [Order Details] AS [o1] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o1].[IsDeleted] = CAST(0 AS bit) OR [o1].[IsDeleted] = CAST(0 AS bit) + ) AS [o2] ON [p0].[ProductID] = [o2].[ProductID] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [o].[OrderID] = [s].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [s].[OrderID], [s].[ProductID], [s].[ProductID0], [s].[OrderID0] + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.2019.MS,True).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.2019.MS,True).sql new file mode 100644 index 00000000000..26064712104 --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.2019.MS,True).sql @@ -0,0 +1,24 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [s].[OrderID], [s].[ProductID], [s].[Discount], [s].[IsDeleted], [s].[Quantity], [s].[UnitPrice], [s].[ProductID0], [s].[CategoryID], [s].[Discontinued], [s].[IsDeleted0], [s].[PeriodEnd], [s].[PeriodStart], [s].[ProductName], [s].[QuantityPerUnit], [s].[ReorderLevel], [s].[SupplierID], [s].[UnitPrice0], [s].[UnitsInStock], [s].[UnitsOnOrder], [s].[OrderID0], [s].[ProductID1], [s].[Discount0], [s].[IsDeleted1], [s].[Quantity0], [s].[UnitPrice1] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder], [o2].[OrderID] AS [OrderID0], [o2].[ProductID] AS [ProductID1], [o2].[Discount] AS [Discount0], [o2].[IsDeleted] AS [IsDeleted1], [o2].[Quantity] AS [Quantity0], [o2].[UnitPrice] AS [UnitPrice1] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + LEFT JOIN ( + SELECT [o1].[OrderID], [o1].[ProductID], [o1].[Discount], [o1].[IsDeleted], [o1].[Quantity], [o1].[UnitPrice] + FROM [Order Details] AS [o1] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o1].[IsDeleted] = CAST(0 AS bit) OR [o1].[IsDeleted] = CAST(0 AS bit) + ) AS [o2] ON [p0].[ProductID] = [o2].[ProductID] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [o].[OrderID] = [s].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [s].[OrderID], [s].[ProductID], [s].[ProductID0], [s].[OrderID0] + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.2019.MS,False).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.2019.MS,False).sql new file mode 100644 index 00000000000..ea7933460c5 --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.2019.MS,False).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [o].[OrderID], [s].[EmployeeID], [s].[TerritoryID], [s].[IsDeleted], [s].[TerritoryID0], [s].[IsDeleted0], [s].[RegionID], [s].[TerritoryDescription], [s0].[OrderID], [s0].[ProductID], [s0].[Discount], [s0].[IsDeleted], [s0].[Quantity], [s0].[UnitPrice], [s0].[ProductID0], [s0].[CategoryID], [s0].[Discontinued], [s0].[IsDeleted0], [s0].[PeriodEnd], [s0].[PeriodStart], [s0].[ProductName], [s0].[QuantityPerUnit], [s0].[ReorderLevel], [s0].[SupplierID], [s0].[UnitPrice0], [s0].[UnitsInStock], [s0].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted], [t0].[TerritoryID] AS [TerritoryID0], [t0].[IsDeleted] AS [IsDeleted0], [t0].[RegionID], [t0].[TerritoryDescription] + FROM [EmployeeTerritories] AS [e1] + INNER JOIN ( + SELECT [t].[TerritoryID], [t].[IsDeleted], [t].[RegionID], [t].[TerritoryDescription] + FROM [Territories] AS [t] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) + ) AS [t0] ON [e1].[TerritoryID] = [t0].[TerritoryID] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [e0].[EmployeeID] = [s].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_5 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s0] ON [o].[OrderID] = [s0].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [s].[EmployeeID], [s].[TerritoryID], [s].[TerritoryID0], [s0].[OrderID], [s0].[ProductID] + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.2019.MS,True).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.2019.MS,True).sql new file mode 100644 index 00000000000..ea7933460c5 --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.2019.MS,True).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [o].[OrderID], [s].[EmployeeID], [s].[TerritoryID], [s].[IsDeleted], [s].[TerritoryID0], [s].[IsDeleted0], [s].[RegionID], [s].[TerritoryDescription], [s0].[OrderID], [s0].[ProductID], [s0].[Discount], [s0].[IsDeleted], [s0].[Quantity], [s0].[UnitPrice], [s0].[ProductID0], [s0].[CategoryID], [s0].[Discontinued], [s0].[IsDeleted0], [s0].[PeriodEnd], [s0].[PeriodStart], [s0].[ProductName], [s0].[QuantityPerUnit], [s0].[ReorderLevel], [s0].[SupplierID], [s0].[UnitPrice0], [s0].[UnitsInStock], [s0].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted], [t0].[TerritoryID] AS [TerritoryID0], [t0].[IsDeleted] AS [IsDeleted0], [t0].[RegionID], [t0].[TerritoryDescription] + FROM [EmployeeTerritories] AS [e1] + INNER JOIN ( + SELECT [t].[TerritoryID], [t].[IsDeleted], [t].[RegionID], [t].[TerritoryDescription] + FROM [Territories] AS [t] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) + ) AS [t0] ON [e1].[TerritoryID] = [t0].[TerritoryID] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [e0].[EmployeeID] = [s].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_5 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s0] ON [o].[OrderID] = [s0].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [s].[EmployeeID], [s].[TerritoryID], [s].[TerritoryID0], [s0].[OrderID], [s0].[ProductID] + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.2019.MS,False).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.2019.MS,False).sql new file mode 100644 index 00000000000..1b9ca7c0743 --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.2019.MS,False).sql @@ -0,0 +1,13 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy], [e1].[EmployeeID], [e1].[Address], [e1].[BirthDate], [e1].[City], [e1].[Country], [e1].[Extension], [e1].[FirstName], [e1].[HireDate], [e1].[HomePhone], [e1].[IsDeleted], [e1].[LastName], [e1].[Notes], [e1].[Photo], [e1].[PhotoPath], [e1].[PostalCode], [e1].[Region], [e1].[ReportsTo], [e1].[Title], [e1].[TitleOfCourtesy] +FROM [Employees] AS [e] +LEFT JOIN ( + SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy] + FROM [Employees] AS [e0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) +) AS [e1] ON [e].[ReportsTo] = [e1].[EmployeeID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.2019.MS,True).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.2019.MS,True).sql new file mode 100644 index 00000000000..1b9ca7c0743 --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.2019.MS,True).sql @@ -0,0 +1,13 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy], [e1].[EmployeeID], [e1].[Address], [e1].[BirthDate], [e1].[City], [e1].[Country], [e1].[Extension], [e1].[FirstName], [e1].[HireDate], [e1].[HomePhone], [e1].[IsDeleted], [e1].[LastName], [e1].[Notes], [e1].[Photo], [e1].[PhotoPath], [e1].[PostalCode], [e1].[Region], [e1].[ReportsTo], [e1].[Title], [e1].[TitleOfCourtesy] +FROM [Employees] AS [e] +LEFT JOIN ( + SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy] + FROM [Employees] AS [e0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) +) AS [e1] ON [e].[ReportsTo] = [e1].[EmployeeID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.2019.MS,False).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.2019.MS,False).sql new file mode 100644 index 00000000000..3180e5e2124 --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.2019.MS,False).sql @@ -0,0 +1,18 @@ +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[IsDeleted], [o].[Quantity], [o].[UnitPrice] +FROM [Products] AS [p] +INNER JOIN [Order Details] AS [o] ON [p].[ProductID] = [o].[ProductID] + + +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice] +FROM [Products] AS [p] +INNER JOIN ( + SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[IsDeleted], [o].[Quantity], [o].[UnitPrice] + FROM [Order Details] AS [o] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +) AS [o0] ON [p].[ProductID] = [o0].[ProductID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.2019.MS,True).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.2019.MS,True).sql new file mode 100644 index 00000000000..3180e5e2124 --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.2019.MS,True).sql @@ -0,0 +1,18 @@ +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[IsDeleted], [o].[Quantity], [o].[UnitPrice] +FROM [Products] AS [p] +INNER JOIN [Order Details] AS [o] ON [p].[ProductID] = [o].[ProductID] + + +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice] +FROM [Products] AS [p] +INNER JOIN ( + SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[IsDeleted], [o].[Quantity], [o].[UnitPrice] + FROM [Order Details] AS [o] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +) AS [o0] ON [p].[ProductID] = [o0].[ProductID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.2019.MS,False).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.2019.MS,False).sql new file mode 100644 index 00000000000..d17a1454daa --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.2019.MS,False).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [s].[EmployeeID], [s].[TerritoryID], [s].[IsDeleted], [s].[TerritoryID0], [s].[IsDeleted0], [s].[RegionID], [s].[TerritoryDescription], [s0].[OrderID], [s0].[ProductID], [s0].[Discount], [s0].[IsDeleted], [s0].[Quantity], [s0].[UnitPrice], [s0].[ProductID0], [s0].[CategoryID], [s0].[Discontinued], [s0].[IsDeleted0], [s0].[PeriodEnd], [s0].[PeriodStart], [s0].[ProductName], [s0].[QuantityPerUnit], [s0].[ReorderLevel], [s0].[SupplierID], [s0].[UnitPrice0], [s0].[UnitsInStock], [s0].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted], [t0].[TerritoryID] AS [TerritoryID0], [t0].[IsDeleted] AS [IsDeleted0], [t0].[RegionID], [t0].[TerritoryDescription] + FROM [EmployeeTerritories] AS [e1] + INNER JOIN ( + SELECT [t].[TerritoryID], [t].[IsDeleted], [t].[RegionID], [t].[TerritoryDescription] + FROM [Territories] AS [t] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) + ) AS [t0] ON [e1].[TerritoryID] = [t0].[TerritoryID] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [e0].[EmployeeID] = [s].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_5 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s0] ON [o].[OrderID] = [s0].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [s].[EmployeeID], [s].[TerritoryID], [s].[TerritoryID0], [s0].[OrderID], [s0].[ProductID] + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.2019.MS,True).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.2019.MS,True).sql new file mode 100644 index 00000000000..d17a1454daa --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.2019.MS,True).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [s].[EmployeeID], [s].[TerritoryID], [s].[IsDeleted], [s].[TerritoryID0], [s].[IsDeleted0], [s].[RegionID], [s].[TerritoryDescription], [s0].[OrderID], [s0].[ProductID], [s0].[Discount], [s0].[IsDeleted], [s0].[Quantity], [s0].[UnitPrice], [s0].[ProductID0], [s0].[CategoryID], [s0].[Discontinued], [s0].[IsDeleted0], [s0].[PeriodEnd], [s0].[PeriodStart], [s0].[ProductName], [s0].[QuantityPerUnit], [s0].[ReorderLevel], [s0].[SupplierID], [s0].[UnitPrice0], [s0].[UnitsInStock], [s0].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted], [t0].[TerritoryID] AS [TerritoryID0], [t0].[IsDeleted] AS [IsDeleted0], [t0].[RegionID], [t0].[TerritoryDescription] + FROM [EmployeeTerritories] AS [e1] + INNER JOIN ( + SELECT [t].[TerritoryID], [t].[IsDeleted], [t].[RegionID], [t].[TerritoryDescription] + FROM [Territories] AS [t] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) + ) AS [t0] ON [e1].[TerritoryID] = [t0].[TerritoryID] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [e0].[EmployeeID] = [s].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_5 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s0] ON [o].[OrderID] = [s0].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [s].[EmployeeID], [s].[TerritoryID], [s].[TerritoryID0], [s0].[OrderID], [s0].[ProductID] + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.2019.MS,False).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.2019.MS,False).sql new file mode 100644 index 00000000000..def257d2102 --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.2019.MS,False).sql @@ -0,0 +1,29 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [e2].[EmployeeID], [e2].[TerritoryID], [e2].[IsDeleted], [s].[OrderID], [s].[ProductID], [s].[Discount], [s].[IsDeleted], [s].[Quantity], [s].[UnitPrice], [s].[ProductID0], [s].[CategoryID], [s].[Discontinued], [s].[IsDeleted0], [s].[PeriodEnd], [s].[PeriodStart], [s].[ProductName], [s].[QuantityPerUnit], [s].[ReorderLevel], [s].[SupplierID], [s].[UnitPrice0], [s].[UnitsInStock], [s].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted] + FROM [EmployeeTerritories] AS [e1] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [e2] ON [e0].[EmployeeID] = [e2].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [o].[OrderID] = [s].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [e2].[EmployeeID], [e2].[TerritoryID], [s].[OrderID], [s].[ProductID] + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.2019.MS,True).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.2019.MS,True).sql new file mode 100644 index 00000000000..def257d2102 --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.2019.MS,True).sql @@ -0,0 +1,29 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [e2].[EmployeeID], [e2].[TerritoryID], [e2].[IsDeleted], [s].[OrderID], [s].[ProductID], [s].[Discount], [s].[IsDeleted], [s].[Quantity], [s].[UnitPrice], [s].[ProductID0], [s].[CategoryID], [s].[Discontinued], [s].[IsDeleted0], [s].[PeriodEnd], [s].[PeriodStart], [s].[ProductName], [s].[QuantityPerUnit], [s].[ReorderLevel], [s].[SupplierID], [s].[UnitPrice0], [s].[UnitsInStock], [s].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted] + FROM [EmployeeTerritories] AS [e1] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [e2] ON [e0].[EmployeeID] = [e2].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [o].[OrderID] = [s].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [e2].[EmployeeID], [e2].[TerritoryID], [s].[OrderID], [s].[ProductID] + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.2019.MS,False).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.2019.MS,False).sql new file mode 100644 index 00000000000..76f07dd62df --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.2019.MS,False).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT [p].[ProductName], [p].[ProductID], [s1].[Discount], [s1].[OrderID], [s1].[CustomerID], [s1].[EmployeeID], [s1].[Freight], [s1].[IsDeleted], [s1].[OrderDate], [s1].[RequiredDate], [s1].[ShipAddress], [s1].[ShipCity], [s1].[ShipCountry], [s1].[ShipName], [s1].[ShipPostalCode], [s1].[ShipRegion], [s1].[ShipVia], [s1].[ShippedDate], [s1].[OrderID0], [s1].[ProductID], [s1].[ProductID0], [s1].[SupplierID], [s1].[ProductID1], [s1].[CategoryID], [s1].[Discontinued], [s1].[IsDeleted0], [s1].[PeriodEnd], [s1].[PeriodStart], [s1].[ProductName], [s1].[QuantityPerUnit], [s1].[ReorderLevel], [s1].[SupplierID0], [s1].[UnitPrice], [s1].[UnitsInStock], [s1].[UnitsOnOrder] +FROM [Products] AS [p] +LEFT JOIN ( + SELECT [o].[Discount], [o1].[OrderID], [o1].[CustomerID], [o1].[EmployeeID], [o1].[Freight], [o1].[IsDeleted], [o1].[OrderDate], [o1].[RequiredDate], [o1].[ShipAddress], [o1].[ShipCity], [o1].[ShipCountry], [o1].[ShipName], [o1].[ShipPostalCode], [o1].[ShipRegion], [o1].[ShipVia], [o1].[ShippedDate], [o].[OrderID] AS [OrderID0], [o].[ProductID], [p1].[ProductID] AS [ProductID0], [s0].[SupplierID], [p3].[ProductID] AS [ProductID1], [p3].[CategoryID], [p3].[Discontinued], [p3].[IsDeleted] AS [IsDeleted0], [p3].[PeriodEnd], [p3].[PeriodStart], [p3].[ProductName], [p3].[QuantityPerUnit], [p3].[ReorderLevel], [p3].[SupplierID] AS [SupplierID0], [p3].[UnitPrice], [p3].[UnitsInStock], [p3].[UnitsOnOrder] + FROM [Order Details] AS [o] + INNER JOIN ( + SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[Freight], [o0].[IsDeleted], [o0].[OrderDate], [o0].[RequiredDate], [o0].[ShipAddress], [o0].[ShipCity], [o0].[ShipCountry], [o0].[ShipName], [o0].[ShipPostalCode], [o0].[ShipRegion], [o0].[ShipVia], [o0].[ShippedDate] + FROM [Orders] AS [o0] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) + ) AS [o1] ON [o].[OrderID] = [o1].[OrderID] + INNER JOIN ( + SELECT [p0].[ProductID], [p0].[SupplierID] + FROM [Products] AS [p0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) + ) AS [p1] ON [o].[ProductID] = [p1].[ProductID] + LEFT JOIN ( + SELECT [s].[SupplierID] + FROM [Suppliers] AS [s] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [s].[IsDeleted] = CAST(0 AS bit) OR [s].[IsDeleted] = CAST(0 AS bit) + ) AS [s0] ON [p1].[SupplierID] = [s0].[SupplierID] + LEFT JOIN ( + SELECT [p2].[ProductID], [p2].[CategoryID], [p2].[Discontinued], [p2].[IsDeleted], [p2].[PeriodEnd], [p2].[PeriodStart], [p2].[ProductName], [p2].[QuantityPerUnit], [p2].[ReorderLevel], [p2].[SupplierID], [p2].[UnitPrice], [p2].[UnitsInStock], [p2].[UnitsOnOrder] + FROM [Products] AS [p2] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p2].[IsDeleted] = CAST(0 AS bit) OR [p2].[IsDeleted] = CAST(0 AS bit) + ) AS [p3] ON [s0].[SupplierID] = [p3].[SupplierID] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +) AS [s1] ON [p].[ProductID] = [s1].[ProductID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) +ORDER BY [p].[ProductID], [s1].[OrderID0], [s1].[ProductID], [s1].[OrderID], [s1].[ProductID0], [s1].[SupplierID] + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.2019.MS,True).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.2019.MS,True).sql new file mode 100644 index 00000000000..76f07dd62df --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.2019.MS,True).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT [p].[ProductName], [p].[ProductID], [s1].[Discount], [s1].[OrderID], [s1].[CustomerID], [s1].[EmployeeID], [s1].[Freight], [s1].[IsDeleted], [s1].[OrderDate], [s1].[RequiredDate], [s1].[ShipAddress], [s1].[ShipCity], [s1].[ShipCountry], [s1].[ShipName], [s1].[ShipPostalCode], [s1].[ShipRegion], [s1].[ShipVia], [s1].[ShippedDate], [s1].[OrderID0], [s1].[ProductID], [s1].[ProductID0], [s1].[SupplierID], [s1].[ProductID1], [s1].[CategoryID], [s1].[Discontinued], [s1].[IsDeleted0], [s1].[PeriodEnd], [s1].[PeriodStart], [s1].[ProductName], [s1].[QuantityPerUnit], [s1].[ReorderLevel], [s1].[SupplierID0], [s1].[UnitPrice], [s1].[UnitsInStock], [s1].[UnitsOnOrder] +FROM [Products] AS [p] +LEFT JOIN ( + SELECT [o].[Discount], [o1].[OrderID], [o1].[CustomerID], [o1].[EmployeeID], [o1].[Freight], [o1].[IsDeleted], [o1].[OrderDate], [o1].[RequiredDate], [o1].[ShipAddress], [o1].[ShipCity], [o1].[ShipCountry], [o1].[ShipName], [o1].[ShipPostalCode], [o1].[ShipRegion], [o1].[ShipVia], [o1].[ShippedDate], [o].[OrderID] AS [OrderID0], [o].[ProductID], [p1].[ProductID] AS [ProductID0], [s0].[SupplierID], [p3].[ProductID] AS [ProductID1], [p3].[CategoryID], [p3].[Discontinued], [p3].[IsDeleted] AS [IsDeleted0], [p3].[PeriodEnd], [p3].[PeriodStart], [p3].[ProductName], [p3].[QuantityPerUnit], [p3].[ReorderLevel], [p3].[SupplierID] AS [SupplierID0], [p3].[UnitPrice], [p3].[UnitsInStock], [p3].[UnitsOnOrder] + FROM [Order Details] AS [o] + INNER JOIN ( + SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[Freight], [o0].[IsDeleted], [o0].[OrderDate], [o0].[RequiredDate], [o0].[ShipAddress], [o0].[ShipCity], [o0].[ShipCountry], [o0].[ShipName], [o0].[ShipPostalCode], [o0].[ShipRegion], [o0].[ShipVia], [o0].[ShippedDate] + FROM [Orders] AS [o0] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) + ) AS [o1] ON [o].[OrderID] = [o1].[OrderID] + INNER JOIN ( + SELECT [p0].[ProductID], [p0].[SupplierID] + FROM [Products] AS [p0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) + ) AS [p1] ON [o].[ProductID] = [p1].[ProductID] + LEFT JOIN ( + SELECT [s].[SupplierID] + FROM [Suppliers] AS [s] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [s].[IsDeleted] = CAST(0 AS bit) OR [s].[IsDeleted] = CAST(0 AS bit) + ) AS [s0] ON [p1].[SupplierID] = [s0].[SupplierID] + LEFT JOIN ( + SELECT [p2].[ProductID], [p2].[CategoryID], [p2].[Discontinued], [p2].[IsDeleted], [p2].[PeriodEnd], [p2].[PeriodStart], [p2].[ProductName], [p2].[QuantityPerUnit], [p2].[ReorderLevel], [p2].[SupplierID], [p2].[UnitPrice], [p2].[UnitsInStock], [p2].[UnitsOnOrder] + FROM [Products] AS [p2] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p2].[IsDeleted] = CAST(0 AS bit) OR [p2].[IsDeleted] = CAST(0 AS bit) + ) AS [p3] ON [s0].[SupplierID] = [p3].[SupplierID] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +) AS [s1] ON [p].[ProductID] = [s1].[ProductID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) +ORDER BY [p].[ProductID], [s1].[OrderID0], [s1].[ProductID], [s1].[OrderID], [s1].[ProductID0], [s1].[SupplierID] + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.2019.MS,False).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.2019.MS,False).sql new file mode 100644 index 00000000000..5e8fe75715c --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.2019.MS,False).sql @@ -0,0 +1,20 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [p1].[ProductID], [p1].[CategoryID], [p1].[Discontinued], [p1].[IsDeleted], [p1].[PeriodEnd], [p1].[PeriodStart], [p1].[ProductName], [p1].[QuantityPerUnit], [p1].[ReorderLevel], [p1].[SupplierID], [p1].[UnitPrice], [p1].[UnitsInStock], [p1].[UnitsOnOrder] +FROM [Products] AS [p] +CROSS JOIN ( + SELECT [p0].[ProductID], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Products] AS [p0] + WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit)) AND ( + SELECT COUNT(*) + FROM [Order Details] AS [o0] + WHERE (@__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit)) AND [p0].[ProductID] = [o0].[ProductID]) > 0 +) AS [p1] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND ( + SELECT COUNT(*) + FROM [Order Details] AS [o] + WHERE (@__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductID] = [o].[ProductID]) > 0 AND [p].[ProductID] = [p1].[ProductID] +ORDER BY [p].[ProductID] + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.2019.MS,True).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.2019.MS,True).sql new file mode 100644 index 00000000000..5e8fe75715c --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.2019.MS,True).sql @@ -0,0 +1,20 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [p1].[ProductID], [p1].[CategoryID], [p1].[Discontinued], [p1].[IsDeleted], [p1].[PeriodEnd], [p1].[PeriodStart], [p1].[ProductName], [p1].[QuantityPerUnit], [p1].[ReorderLevel], [p1].[SupplierID], [p1].[UnitPrice], [p1].[UnitsInStock], [p1].[UnitsOnOrder] +FROM [Products] AS [p] +CROSS JOIN ( + SELECT [p0].[ProductID], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Products] AS [p0] + WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit)) AND ( + SELECT COUNT(*) + FROM [Order Details] AS [o0] + WHERE (@__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit)) AND [p0].[ProductID] = [o0].[ProductID]) > 0 +) AS [p1] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND ( + SELECT COUNT(*) + FROM [Order Details] AS [o] + WHERE (@__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductID] = [o].[ProductID]) > 0 AND [p].[ProductID] = [p1].[ProductID] +ORDER BY [p].[ProductID] + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.2019.MS,False).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.2019.MS,False).sql new file mode 100644 index 00000000000..03ff17e1f17 --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.2019.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__test_0='?' (DbType = Int32) + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] +FROM [Employees] AS [e] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit)) AND [e].[EmployeeID] = @__test_0 + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.2019.MS,True).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.2019.MS,True).sql new file mode 100644 index 00000000000..03ff17e1f17 --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.2019.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__test_0='?' (DbType = Int32) + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] +FROM [Employees] AS [e] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit)) AND [e].[EmployeeID] = @__test_0 + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.2019.MS,False).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.2019.MS,False).sql new file mode 100644 index 00000000000..e047dc4281d --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.2019.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT TOP(1) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[IsDeleted], [c].[Phone], [c].[PostalCode], [c].[Region] +FROM [Customers] AS [c] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.2019.MS,True).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.2019.MS,True).sql new file mode 100644 index 00000000000..e047dc4281d --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.2019.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT TOP(1) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[IsDeleted], [c].[Phone], [c].[PostalCode], [c].[Region] +FROM [Customers] AS [c] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.2019.MS,False).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.2019.MS,False).sql new file mode 100644 index 00000000000..1d6793b0b8c --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.2019.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[QuantityPerUnit] AS [Quantity] +FROM [Products] AS [p] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.2019.MS,True).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.2019.MS,True).sql new file mode 100644 index 00000000000..1d6793b0b8c --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.2019.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[QuantityPerUnit] AS [Quantity] +FROM [Products] AS [p] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.2019.MS,False).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.2019.MS,False).sql new file mode 100644 index 00000000000..5853efae690 --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.2019.MS,False).sql @@ -0,0 +1,15 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +-- Tagged query + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy], [e1].[EmployeeID], [e1].[Address], [e1].[BirthDate], [e1].[City], [e1].[Country], [e1].[Extension], [e1].[FirstName], [e1].[HireDate], [e1].[HomePhone], [e1].[IsDeleted], [e1].[LastName], [e1].[Notes], [e1].[Photo], [e1].[PhotoPath], [e1].[PostalCode], [e1].[Region], [e1].[ReportsTo], [e1].[Title], [e1].[TitleOfCourtesy] +FROM [Employees] AS [e] +LEFT JOIN ( + SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy] + FROM [Employees] AS [e0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) +) AS [e1] ON [e].[ReportsTo] = [e1].[EmployeeID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.2019.MS,True).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.2019.MS,True).sql new file mode 100644 index 00000000000..5853efae690 --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.2019.MS,True).sql @@ -0,0 +1,15 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +-- Tagged query + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy], [e1].[EmployeeID], [e1].[Address], [e1].[BirthDate], [e1].[City], [e1].[Country], [e1].[Extension], [e1].[FirstName], [e1].[HireDate], [e1].[HomePhone], [e1].[IsDeleted], [e1].[LastName], [e1].[Notes], [e1].[Photo], [e1].[PhotoPath], [e1].[PostalCode], [e1].[Region], [e1].[ReportsTo], [e1].[Title], [e1].[TitleOfCourtesy] +FROM [Employees] AS [e] +LEFT JOIN ( + SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy] + FROM [Employees] AS [e0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) +) AS [e1] ON [e].[ReportsTo] = [e1].[EmployeeID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.2019.MS,False).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.2019.MS,False).sql new file mode 100644 index 00000000000..52ce94a469e --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.2019.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT MAX([p].[QuantityPerUnit]) +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'U%' + + diff --git a/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.2019.MS,True).sql b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.2019.MS,True).sql new file mode 100644 index 00000000000..52ce94a469e --- /dev/null +++ b/SqlServer.2019.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.2019.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT MAX([p].[QuantityPerUnit]) +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'U%' + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ConvertorTests/LinqToDB.EntityFrameworkCore.Tests.ConvertorTests.TestToList(SqlServer.2022.MS).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ConvertorTests/LinqToDB.EntityFrameworkCore.Tests.ConvertorTests.TestToList(SqlServer.2022.MS).sql new file mode 100644 index 00000000000..4509e56882e --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ConvertorTests/LinqToDB.EntityFrameworkCore.Tests.ConvertorTests.TestToList(SqlServer.2022.MS).sql @@ -0,0 +1,5 @@ +SELECT [s].[Id], [s].[Code], [s].[IsDeleted], [s].[Name], [s].[PermanentId] +FROM [Subdivisions] AS [s] +WHERE CAST([s].[Id] AS bigint) = CAST(1 AS bigint) + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestAmbiguousProperties(SqlServer.2022.MS).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestAmbiguousProperties(SqlServer.2022.MS).sql new file mode 100644 index 00000000000..3c073d8eed0 --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestAmbiguousProperties(SqlServer.2022.MS).sql @@ -0,0 +1,5 @@ +SELECT [w].[Id], [w].[Value] +FROM [WithDuplicateProperties] AS [w] +WHERE [w].[Value] = 1 + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestInheritance(SqlServer.2022.MS).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestInheritance(SqlServer.2022.MS).sql new file mode 100644 index 00000000000..40314a1747b --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestInheritance(SqlServer.2022.MS).sql @@ -0,0 +1,17 @@ +Parameters: +@p0='?' (Size = 21), @p1='?' (Size = 21), @p2='?' (Size = 21), @p3='?' (Size = 21), @p4='?' (Size = 21) + +SET IMPLICIT_TRANSACTIONS OFF; +SET NOCOUNT ON; +MERGE [WithInheritance] USING ( +VALUES (@p0, 0), +(@p1, 1), +(@p2, 2), +(@p3, 3), +(@p4, 4)) AS i ([Discriminator], _Position) ON 1=0 +WHEN NOT MATCHED THEN +INSERT ([Discriminator]) +VALUES (i.[Discriminator]) +OUTPUT INSERTED.[Id], i._Position; + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestUIntTable(SqlServer.2022.MS).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestUIntTable(SqlServer.2022.MS).sql new file mode 100644 index 00000000000..1c910246616 --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestUIntTable(SqlServer.2022.MS).sql @@ -0,0 +1,10 @@ +Parameters: +@p0='?' (DbType = Int32), @p1='?' (DbType = Int32), @p2='?' (DbType = Int64), @p3='?' (DbType = Int64), @p4='?' (Precision = 20) (DbType = Decimal), @p5='?' (Precision = 20) (DbType = Decimal) + +SET IMPLICIT_TRANSACTIONS OFF; +SET NOCOUNT ON; +INSERT INTO [UIntTable] ([Field16], [Field16N], [Field32], [Field32N], [Field64], [Field64N]) +OUTPUT INSERTED.[ID] +VALUES (@p0, @p1, @p2, @p3, @p4, @p5); + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2022.MS,Default).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2022.MS,Default).sql new file mode 100644 index 00000000000..d005c63a292 --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2022.MS,Default).sql @@ -0,0 +1,4 @@ +SELECT [b].[Id], [b].[BlogType], [b].[Url] +FROM [Blogs] AS [b] + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2022.MS,MultipleRows).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2022.MS,MultipleRows).sql new file mode 100644 index 00000000000..d005c63a292 --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2022.MS,MultipleRows).sql @@ -0,0 +1,4 @@ +SELECT [b].[Id], [b].[BlogType], [b].[Url] +FROM [Blogs] AS [b] + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2022.MS,ProviderSpecific).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2022.MS,ProviderSpecific).sql new file mode 100644 index 00000000000..d005c63a292 --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2022.MS,ProviderSpecific).sql @@ -0,0 +1,4 @@ +SELECT [b].[Id], [b].[BlogType], [b].[Url] +FROM [Blogs] AS [b] + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2022.MS,RowByRow).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2022.MS,RowByRow).sql new file mode 100644 index 00000000000..d005c63a292 --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.2022.MS,RowByRow).sql @@ -0,0 +1,4 @@ +SELECT [b].[Id], [b].[BlogType], [b].[Url] +FROM [Blogs] AS [b] + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InterceptorTests/LinqToDB.EntityFrameworkCore.Tests.InterceptorTests.TestEfCoreSideOfComboInterceptor(SqlServer.2022.MS).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InterceptorTests/LinqToDB.EntityFrameworkCore.Tests.InterceptorTests.TestEfCoreSideOfComboInterceptor(SqlServer.2022.MS).sql new file mode 100644 index 00000000000..550d60442c5 --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InterceptorTests/LinqToDB.EntityFrameworkCore.Tests.InterceptorTests.TestEfCoreSideOfComboInterceptor(SqlServer.2022.MS).sql @@ -0,0 +1,9 @@ +Parameters: +@__p_0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT TOP(@__p_0) [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductID] > 0 +ORDER BY [p].[ProductID] + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue117Test(SqlServer.2022.MS).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue117Test(SqlServer.2022.MS).sql new file mode 100644 index 00000000000..1e0723a91d2 --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue117Test(SqlServer.2022.MS).sql @@ -0,0 +1,9 @@ +Parameters: +@__userId_1='?' (DbType = Int32), @__userId_0='?' (DbType = Int32) + +SELECT [p].[Id] AS [PatentId], @__userId_1 AS [UserId] +FROM [Patents] AS [p] +LEFT JOIN [PatentAssessment] AS [p0] ON [p].[Id] = [p0].[PatentId] +WHERE [p0].[PatentId] IS NULL OR [p0].[TechnicalReviewerId] <> @__userId_0 OR [p0].[TechnicalReviewerId] IS NULL + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue73Test(SqlServer.2022.MS).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue73Test(SqlServer.2022.MS).sql new file mode 100644 index 00000000000..6a6908a5aa9 --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue73Test(SqlServer.2022.MS).sql @@ -0,0 +1,6 @@ +SELECT COALESCE([i0].[Name], N'') + N'>' + [i].[Name] +FROM [Issue73Entities] AS [i] +LEFT JOIN [Issue73Entities] AS [i0] ON [i].[ParentId] = [i0].[Id] +WHERE [i].[Name] = N'Name1_3' + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated(SqlServer.2022.MS).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated(SqlServer.2022.MS).sql new file mode 100644 index 00000000000..761b1ced8fe --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated(SqlServer.2022.MS).sql @@ -0,0 +1,10 @@ +Parameters: +p0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [l].[CategoryID], [l].[CategoryName], [l].[Description], [l].[IsDeleted], [l].[Picture] +FROM ( + SELECT * FROM [dbo].[Categories] WHERE CategoryId = @p0 +) AS [l] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated2(SqlServer.2022.MS).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated2(SqlServer.2022.MS).sql new file mode 100644 index 00000000000..4e7025136cc --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated2(SqlServer.2022.MS).sql @@ -0,0 +1,15 @@ +Parameters: +p0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [l0].[CategoryID], [l0].[CategoryName], [l0].[Description], [l0].[IsDeleted], [l0].[Picture] +FROM [Categories] AS [c] +CROSS JOIN ( + SELECT [l].[CategoryID], [l].[CategoryName], [l].[Description], [l].[IsDeleted], [l].[Picture] + FROM ( + SELECT * FROM [dbo].[Categories] WHERE CategoryId = @p0 + ) AS [l] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) +) AS [l0] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw(SqlServer.2022.MS).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw(SqlServer.2022.MS).sql new file mode 100644 index 00000000000..761b1ced8fe --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw(SqlServer.2022.MS).sql @@ -0,0 +1,10 @@ +Parameters: +p0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [l].[CategoryID], [l].[CategoryName], [l].[Description], [l].[IsDeleted], [l].[Picture] +FROM ( + SELECT * FROM [dbo].[Categories] WHERE CategoryId = @p0 +) AS [l] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw2(SqlServer.2022.MS).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw2(SqlServer.2022.MS).sql new file mode 100644 index 00000000000..4e7025136cc --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw2(SqlServer.2022.MS).sql @@ -0,0 +1,15 @@ +Parameters: +p0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [l0].[CategoryID], [l0].[CategoryName], [l0].[Description], [l0].[IsDeleted], [l0].[Picture] +FROM [Categories] AS [c] +CROSS JOIN ( + SELECT [l].[CategoryID], [l].[CategoryName], [l].[Description], [l].[IsDeleted], [l].[Picture] + FROM ( + SELECT * FROM [dbo].[Categories] WHERE CategoryId = @p0 + ) AS [l] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) +) AS [l0] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.NavigationProperties(SqlServer.2022.MS).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.NavigationProperties(SqlServer.2022.MS).sql new file mode 100644 index 00000000000..4787fb868ab --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.NavigationProperties(SqlServer.2022.MS).sql @@ -0,0 +1,24 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o1].[OrderID], [o1].[ProductID], [p0].[ProductID], [o3].[OrderId], [o3].[ProductId], [o3].[Quantity], [o1].[Quantity], [p0].[ProductName] +FROM [Orders] AS [o] +INNER JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Quantity] + FROM [Order Details] AS [o0] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [o1] ON [o].[OrderID] = [o1].[OrderID] +INNER JOIN ( + SELECT [p].[ProductID], [p].[ProductName] + FROM [Products] AS [p] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) +) AS [p0] ON [o1].[ProductID] = [p0].[ProductID] +LEFT JOIN ( + SELECT [o2].[OrderID] AS [OrderId], [o2].[ProductID] AS [ProductId], [o2].[Quantity] + FROM [Order Details] AS [o2] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o2].[IsDeleted] = CAST(0 AS bit) OR [o2].[IsDeleted] = CAST(0 AS bit) +) AS [o3] ON [p0].[ProductID] = [o3].[ProductId] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [o1].[OrderID], [o1].[ProductID], [p0].[ProductID], [o3].[OrderId] + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.2022.MS,False).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.2022.MS,False).sql new file mode 100644 index 00000000000..d971cbfab3d --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.2022.MS,False).sql @@ -0,0 +1,28 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%' + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%' + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT CASE + WHEN EXISTS ( + SELECT 1 + FROM [Products] AS [p] + WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%') THEN CAST(1 AS bit) + ELSE CAST(0 AS bit) +END + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.2022.MS,True).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.2022.MS,True).sql new file mode 100644 index 00000000000..d971cbfab3d --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.2022.MS,True).sql @@ -0,0 +1,28 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%' + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%' + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT CASE + WHEN EXISTS ( + SELECT 1 + FROM [Products] AS [p] + WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%') THEN CAST(1 AS bit) + ELSE CAST(0 AS bit) +END + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.2022.MS,False).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.2022.MS,False).sql new file mode 100644 index 00000000000..5c143463885 --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.2022.MS,False).sql @@ -0,0 +1,10 @@ +Parameters: +@p1='?' (DbType = Int32), @p2='?' (DbType = Int32), @p0='?' (DbType = Currency) + +SET IMPLICIT_TRANSACTIONS OFF; +SET NOCOUNT ON; +UPDATE [Order Details] SET [UnitPrice] = @p0 +OUTPUT 1 +WHERE [OrderID] = @p1 AND [ProductID] = @p2; + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.2022.MS,True).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.2022.MS,True).sql new file mode 100644 index 00000000000..5c143463885 --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.2022.MS,True).sql @@ -0,0 +1,10 @@ +Parameters: +@p1='?' (DbType = Int32), @p2='?' (DbType = Int32), @p0='?' (DbType = Currency) + +SET IMPLICIT_TRANSACTIONS OFF; +SET NOCOUNT ON; +UPDATE [Order Details] SET [UnitPrice] = @p0 +OUTPUT 1 +WHERE [OrderID] = @p1 AND [ProductID] = @p2; + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestCommandTimeout(SqlServer.2022.MS).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestCommandTimeout(SqlServer.2022.MS).sql new file mode 100644 index 00000000000..54eea14853c --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestCommandTimeout(SqlServer.2022.MS).sql @@ -0,0 +1,19 @@ +CREATE OR ALTER FUNCTION dbo.[ProcessLong] + ( + @secondsNumber int + ) + RETURNS int + AS + BEGIN + declare @startTime datetime = getutcdate() + while datediff(second, @startTime, getutcdate()) < @secondsNumber + begin + set @startTime = @startTime + end + return 1 + END + + +DROP FUNCTION IF EXISTS [dbo].[ProcessLong] + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.2022.MS,False).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.2022.MS,False).sql new file mode 100644 index 00000000000..26064712104 --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.2022.MS,False).sql @@ -0,0 +1,24 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [s].[OrderID], [s].[ProductID], [s].[Discount], [s].[IsDeleted], [s].[Quantity], [s].[UnitPrice], [s].[ProductID0], [s].[CategoryID], [s].[Discontinued], [s].[IsDeleted0], [s].[PeriodEnd], [s].[PeriodStart], [s].[ProductName], [s].[QuantityPerUnit], [s].[ReorderLevel], [s].[SupplierID], [s].[UnitPrice0], [s].[UnitsInStock], [s].[UnitsOnOrder], [s].[OrderID0], [s].[ProductID1], [s].[Discount0], [s].[IsDeleted1], [s].[Quantity0], [s].[UnitPrice1] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder], [o2].[OrderID] AS [OrderID0], [o2].[ProductID] AS [ProductID1], [o2].[Discount] AS [Discount0], [o2].[IsDeleted] AS [IsDeleted1], [o2].[Quantity] AS [Quantity0], [o2].[UnitPrice] AS [UnitPrice1] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + LEFT JOIN ( + SELECT [o1].[OrderID], [o1].[ProductID], [o1].[Discount], [o1].[IsDeleted], [o1].[Quantity], [o1].[UnitPrice] + FROM [Order Details] AS [o1] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o1].[IsDeleted] = CAST(0 AS bit) OR [o1].[IsDeleted] = CAST(0 AS bit) + ) AS [o2] ON [p0].[ProductID] = [o2].[ProductID] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [o].[OrderID] = [s].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [s].[OrderID], [s].[ProductID], [s].[ProductID0], [s].[OrderID0] + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.2022.MS,True).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.2022.MS,True).sql new file mode 100644 index 00000000000..26064712104 --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.2022.MS,True).sql @@ -0,0 +1,24 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [s].[OrderID], [s].[ProductID], [s].[Discount], [s].[IsDeleted], [s].[Quantity], [s].[UnitPrice], [s].[ProductID0], [s].[CategoryID], [s].[Discontinued], [s].[IsDeleted0], [s].[PeriodEnd], [s].[PeriodStart], [s].[ProductName], [s].[QuantityPerUnit], [s].[ReorderLevel], [s].[SupplierID], [s].[UnitPrice0], [s].[UnitsInStock], [s].[UnitsOnOrder], [s].[OrderID0], [s].[ProductID1], [s].[Discount0], [s].[IsDeleted1], [s].[Quantity0], [s].[UnitPrice1] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder], [o2].[OrderID] AS [OrderID0], [o2].[ProductID] AS [ProductID1], [o2].[Discount] AS [Discount0], [o2].[IsDeleted] AS [IsDeleted1], [o2].[Quantity] AS [Quantity0], [o2].[UnitPrice] AS [UnitPrice1] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + LEFT JOIN ( + SELECT [o1].[OrderID], [o1].[ProductID], [o1].[Discount], [o1].[IsDeleted], [o1].[Quantity], [o1].[UnitPrice] + FROM [Order Details] AS [o1] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o1].[IsDeleted] = CAST(0 AS bit) OR [o1].[IsDeleted] = CAST(0 AS bit) + ) AS [o2] ON [p0].[ProductID] = [o2].[ProductID] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [o].[OrderID] = [s].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [s].[OrderID], [s].[ProductID], [s].[ProductID0], [s].[OrderID0] + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.2022.MS,False).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.2022.MS,False).sql new file mode 100644 index 00000000000..ea7933460c5 --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.2022.MS,False).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [o].[OrderID], [s].[EmployeeID], [s].[TerritoryID], [s].[IsDeleted], [s].[TerritoryID0], [s].[IsDeleted0], [s].[RegionID], [s].[TerritoryDescription], [s0].[OrderID], [s0].[ProductID], [s0].[Discount], [s0].[IsDeleted], [s0].[Quantity], [s0].[UnitPrice], [s0].[ProductID0], [s0].[CategoryID], [s0].[Discontinued], [s0].[IsDeleted0], [s0].[PeriodEnd], [s0].[PeriodStart], [s0].[ProductName], [s0].[QuantityPerUnit], [s0].[ReorderLevel], [s0].[SupplierID], [s0].[UnitPrice0], [s0].[UnitsInStock], [s0].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted], [t0].[TerritoryID] AS [TerritoryID0], [t0].[IsDeleted] AS [IsDeleted0], [t0].[RegionID], [t0].[TerritoryDescription] + FROM [EmployeeTerritories] AS [e1] + INNER JOIN ( + SELECT [t].[TerritoryID], [t].[IsDeleted], [t].[RegionID], [t].[TerritoryDescription] + FROM [Territories] AS [t] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) + ) AS [t0] ON [e1].[TerritoryID] = [t0].[TerritoryID] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [e0].[EmployeeID] = [s].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_5 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s0] ON [o].[OrderID] = [s0].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [s].[EmployeeID], [s].[TerritoryID], [s].[TerritoryID0], [s0].[OrderID], [s0].[ProductID] + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.2022.MS,True).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.2022.MS,True).sql new file mode 100644 index 00000000000..ea7933460c5 --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.2022.MS,True).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [o].[OrderID], [s].[EmployeeID], [s].[TerritoryID], [s].[IsDeleted], [s].[TerritoryID0], [s].[IsDeleted0], [s].[RegionID], [s].[TerritoryDescription], [s0].[OrderID], [s0].[ProductID], [s0].[Discount], [s0].[IsDeleted], [s0].[Quantity], [s0].[UnitPrice], [s0].[ProductID0], [s0].[CategoryID], [s0].[Discontinued], [s0].[IsDeleted0], [s0].[PeriodEnd], [s0].[PeriodStart], [s0].[ProductName], [s0].[QuantityPerUnit], [s0].[ReorderLevel], [s0].[SupplierID], [s0].[UnitPrice0], [s0].[UnitsInStock], [s0].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted], [t0].[TerritoryID] AS [TerritoryID0], [t0].[IsDeleted] AS [IsDeleted0], [t0].[RegionID], [t0].[TerritoryDescription] + FROM [EmployeeTerritories] AS [e1] + INNER JOIN ( + SELECT [t].[TerritoryID], [t].[IsDeleted], [t].[RegionID], [t].[TerritoryDescription] + FROM [Territories] AS [t] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) + ) AS [t0] ON [e1].[TerritoryID] = [t0].[TerritoryID] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [e0].[EmployeeID] = [s].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_5 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s0] ON [o].[OrderID] = [s0].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [s].[EmployeeID], [s].[TerritoryID], [s].[TerritoryID0], [s0].[OrderID], [s0].[ProductID] + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.2022.MS,False).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.2022.MS,False).sql new file mode 100644 index 00000000000..1b9ca7c0743 --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.2022.MS,False).sql @@ -0,0 +1,13 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy], [e1].[EmployeeID], [e1].[Address], [e1].[BirthDate], [e1].[City], [e1].[Country], [e1].[Extension], [e1].[FirstName], [e1].[HireDate], [e1].[HomePhone], [e1].[IsDeleted], [e1].[LastName], [e1].[Notes], [e1].[Photo], [e1].[PhotoPath], [e1].[PostalCode], [e1].[Region], [e1].[ReportsTo], [e1].[Title], [e1].[TitleOfCourtesy] +FROM [Employees] AS [e] +LEFT JOIN ( + SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy] + FROM [Employees] AS [e0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) +) AS [e1] ON [e].[ReportsTo] = [e1].[EmployeeID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.2022.MS,True).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.2022.MS,True).sql new file mode 100644 index 00000000000..1b9ca7c0743 --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.2022.MS,True).sql @@ -0,0 +1,13 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy], [e1].[EmployeeID], [e1].[Address], [e1].[BirthDate], [e1].[City], [e1].[Country], [e1].[Extension], [e1].[FirstName], [e1].[HireDate], [e1].[HomePhone], [e1].[IsDeleted], [e1].[LastName], [e1].[Notes], [e1].[Photo], [e1].[PhotoPath], [e1].[PostalCode], [e1].[Region], [e1].[ReportsTo], [e1].[Title], [e1].[TitleOfCourtesy] +FROM [Employees] AS [e] +LEFT JOIN ( + SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy] + FROM [Employees] AS [e0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) +) AS [e1] ON [e].[ReportsTo] = [e1].[EmployeeID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.2022.MS,False).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.2022.MS,False).sql new file mode 100644 index 00000000000..3180e5e2124 --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.2022.MS,False).sql @@ -0,0 +1,18 @@ +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[IsDeleted], [o].[Quantity], [o].[UnitPrice] +FROM [Products] AS [p] +INNER JOIN [Order Details] AS [o] ON [p].[ProductID] = [o].[ProductID] + + +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice] +FROM [Products] AS [p] +INNER JOIN ( + SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[IsDeleted], [o].[Quantity], [o].[UnitPrice] + FROM [Order Details] AS [o] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +) AS [o0] ON [p].[ProductID] = [o0].[ProductID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.2022.MS,True).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.2022.MS,True).sql new file mode 100644 index 00000000000..3180e5e2124 --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.2022.MS,True).sql @@ -0,0 +1,18 @@ +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[IsDeleted], [o].[Quantity], [o].[UnitPrice] +FROM [Products] AS [p] +INNER JOIN [Order Details] AS [o] ON [p].[ProductID] = [o].[ProductID] + + +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice] +FROM [Products] AS [p] +INNER JOIN ( + SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[IsDeleted], [o].[Quantity], [o].[UnitPrice] + FROM [Order Details] AS [o] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +) AS [o0] ON [p].[ProductID] = [o0].[ProductID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.2022.MS,False).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.2022.MS,False).sql new file mode 100644 index 00000000000..d17a1454daa --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.2022.MS,False).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [s].[EmployeeID], [s].[TerritoryID], [s].[IsDeleted], [s].[TerritoryID0], [s].[IsDeleted0], [s].[RegionID], [s].[TerritoryDescription], [s0].[OrderID], [s0].[ProductID], [s0].[Discount], [s0].[IsDeleted], [s0].[Quantity], [s0].[UnitPrice], [s0].[ProductID0], [s0].[CategoryID], [s0].[Discontinued], [s0].[IsDeleted0], [s0].[PeriodEnd], [s0].[PeriodStart], [s0].[ProductName], [s0].[QuantityPerUnit], [s0].[ReorderLevel], [s0].[SupplierID], [s0].[UnitPrice0], [s0].[UnitsInStock], [s0].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted], [t0].[TerritoryID] AS [TerritoryID0], [t0].[IsDeleted] AS [IsDeleted0], [t0].[RegionID], [t0].[TerritoryDescription] + FROM [EmployeeTerritories] AS [e1] + INNER JOIN ( + SELECT [t].[TerritoryID], [t].[IsDeleted], [t].[RegionID], [t].[TerritoryDescription] + FROM [Territories] AS [t] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) + ) AS [t0] ON [e1].[TerritoryID] = [t0].[TerritoryID] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [e0].[EmployeeID] = [s].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_5 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s0] ON [o].[OrderID] = [s0].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [s].[EmployeeID], [s].[TerritoryID], [s].[TerritoryID0], [s0].[OrderID], [s0].[ProductID] + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.2022.MS,True).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.2022.MS,True).sql new file mode 100644 index 00000000000..d17a1454daa --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.2022.MS,True).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [s].[EmployeeID], [s].[TerritoryID], [s].[IsDeleted], [s].[TerritoryID0], [s].[IsDeleted0], [s].[RegionID], [s].[TerritoryDescription], [s0].[OrderID], [s0].[ProductID], [s0].[Discount], [s0].[IsDeleted], [s0].[Quantity], [s0].[UnitPrice], [s0].[ProductID0], [s0].[CategoryID], [s0].[Discontinued], [s0].[IsDeleted0], [s0].[PeriodEnd], [s0].[PeriodStart], [s0].[ProductName], [s0].[QuantityPerUnit], [s0].[ReorderLevel], [s0].[SupplierID], [s0].[UnitPrice0], [s0].[UnitsInStock], [s0].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted], [t0].[TerritoryID] AS [TerritoryID0], [t0].[IsDeleted] AS [IsDeleted0], [t0].[RegionID], [t0].[TerritoryDescription] + FROM [EmployeeTerritories] AS [e1] + INNER JOIN ( + SELECT [t].[TerritoryID], [t].[IsDeleted], [t].[RegionID], [t].[TerritoryDescription] + FROM [Territories] AS [t] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) + ) AS [t0] ON [e1].[TerritoryID] = [t0].[TerritoryID] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [e0].[EmployeeID] = [s].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_5 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s0] ON [o].[OrderID] = [s0].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [s].[EmployeeID], [s].[TerritoryID], [s].[TerritoryID0], [s0].[OrderID], [s0].[ProductID] + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.2022.MS,False).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.2022.MS,False).sql new file mode 100644 index 00000000000..def257d2102 --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.2022.MS,False).sql @@ -0,0 +1,29 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [e2].[EmployeeID], [e2].[TerritoryID], [e2].[IsDeleted], [s].[OrderID], [s].[ProductID], [s].[Discount], [s].[IsDeleted], [s].[Quantity], [s].[UnitPrice], [s].[ProductID0], [s].[CategoryID], [s].[Discontinued], [s].[IsDeleted0], [s].[PeriodEnd], [s].[PeriodStart], [s].[ProductName], [s].[QuantityPerUnit], [s].[ReorderLevel], [s].[SupplierID], [s].[UnitPrice0], [s].[UnitsInStock], [s].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted] + FROM [EmployeeTerritories] AS [e1] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [e2] ON [e0].[EmployeeID] = [e2].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [o].[OrderID] = [s].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [e2].[EmployeeID], [e2].[TerritoryID], [s].[OrderID], [s].[ProductID] + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.2022.MS,True).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.2022.MS,True).sql new file mode 100644 index 00000000000..def257d2102 --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.2022.MS,True).sql @@ -0,0 +1,29 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [e2].[EmployeeID], [e2].[TerritoryID], [e2].[IsDeleted], [s].[OrderID], [s].[ProductID], [s].[Discount], [s].[IsDeleted], [s].[Quantity], [s].[UnitPrice], [s].[ProductID0], [s].[CategoryID], [s].[Discontinued], [s].[IsDeleted0], [s].[PeriodEnd], [s].[PeriodStart], [s].[ProductName], [s].[QuantityPerUnit], [s].[ReorderLevel], [s].[SupplierID], [s].[UnitPrice0], [s].[UnitsInStock], [s].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted] + FROM [EmployeeTerritories] AS [e1] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [e2] ON [e0].[EmployeeID] = [e2].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [o].[OrderID] = [s].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [e2].[EmployeeID], [e2].[TerritoryID], [s].[OrderID], [s].[ProductID] + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.2022.MS,False).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.2022.MS,False).sql new file mode 100644 index 00000000000..76f07dd62df --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.2022.MS,False).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT [p].[ProductName], [p].[ProductID], [s1].[Discount], [s1].[OrderID], [s1].[CustomerID], [s1].[EmployeeID], [s1].[Freight], [s1].[IsDeleted], [s1].[OrderDate], [s1].[RequiredDate], [s1].[ShipAddress], [s1].[ShipCity], [s1].[ShipCountry], [s1].[ShipName], [s1].[ShipPostalCode], [s1].[ShipRegion], [s1].[ShipVia], [s1].[ShippedDate], [s1].[OrderID0], [s1].[ProductID], [s1].[ProductID0], [s1].[SupplierID], [s1].[ProductID1], [s1].[CategoryID], [s1].[Discontinued], [s1].[IsDeleted0], [s1].[PeriodEnd], [s1].[PeriodStart], [s1].[ProductName], [s1].[QuantityPerUnit], [s1].[ReorderLevel], [s1].[SupplierID0], [s1].[UnitPrice], [s1].[UnitsInStock], [s1].[UnitsOnOrder] +FROM [Products] AS [p] +LEFT JOIN ( + SELECT [o].[Discount], [o1].[OrderID], [o1].[CustomerID], [o1].[EmployeeID], [o1].[Freight], [o1].[IsDeleted], [o1].[OrderDate], [o1].[RequiredDate], [o1].[ShipAddress], [o1].[ShipCity], [o1].[ShipCountry], [o1].[ShipName], [o1].[ShipPostalCode], [o1].[ShipRegion], [o1].[ShipVia], [o1].[ShippedDate], [o].[OrderID] AS [OrderID0], [o].[ProductID], [p1].[ProductID] AS [ProductID0], [s0].[SupplierID], [p3].[ProductID] AS [ProductID1], [p3].[CategoryID], [p3].[Discontinued], [p3].[IsDeleted] AS [IsDeleted0], [p3].[PeriodEnd], [p3].[PeriodStart], [p3].[ProductName], [p3].[QuantityPerUnit], [p3].[ReorderLevel], [p3].[SupplierID] AS [SupplierID0], [p3].[UnitPrice], [p3].[UnitsInStock], [p3].[UnitsOnOrder] + FROM [Order Details] AS [o] + INNER JOIN ( + SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[Freight], [o0].[IsDeleted], [o0].[OrderDate], [o0].[RequiredDate], [o0].[ShipAddress], [o0].[ShipCity], [o0].[ShipCountry], [o0].[ShipName], [o0].[ShipPostalCode], [o0].[ShipRegion], [o0].[ShipVia], [o0].[ShippedDate] + FROM [Orders] AS [o0] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) + ) AS [o1] ON [o].[OrderID] = [o1].[OrderID] + INNER JOIN ( + SELECT [p0].[ProductID], [p0].[SupplierID] + FROM [Products] AS [p0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) + ) AS [p1] ON [o].[ProductID] = [p1].[ProductID] + LEFT JOIN ( + SELECT [s].[SupplierID] + FROM [Suppliers] AS [s] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [s].[IsDeleted] = CAST(0 AS bit) OR [s].[IsDeleted] = CAST(0 AS bit) + ) AS [s0] ON [p1].[SupplierID] = [s0].[SupplierID] + LEFT JOIN ( + SELECT [p2].[ProductID], [p2].[CategoryID], [p2].[Discontinued], [p2].[IsDeleted], [p2].[PeriodEnd], [p2].[PeriodStart], [p2].[ProductName], [p2].[QuantityPerUnit], [p2].[ReorderLevel], [p2].[SupplierID], [p2].[UnitPrice], [p2].[UnitsInStock], [p2].[UnitsOnOrder] + FROM [Products] AS [p2] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p2].[IsDeleted] = CAST(0 AS bit) OR [p2].[IsDeleted] = CAST(0 AS bit) + ) AS [p3] ON [s0].[SupplierID] = [p3].[SupplierID] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +) AS [s1] ON [p].[ProductID] = [s1].[ProductID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) +ORDER BY [p].[ProductID], [s1].[OrderID0], [s1].[ProductID], [s1].[OrderID], [s1].[ProductID0], [s1].[SupplierID] + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.2022.MS,True).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.2022.MS,True).sql new file mode 100644 index 00000000000..76f07dd62df --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.2022.MS,True).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT [p].[ProductName], [p].[ProductID], [s1].[Discount], [s1].[OrderID], [s1].[CustomerID], [s1].[EmployeeID], [s1].[Freight], [s1].[IsDeleted], [s1].[OrderDate], [s1].[RequiredDate], [s1].[ShipAddress], [s1].[ShipCity], [s1].[ShipCountry], [s1].[ShipName], [s1].[ShipPostalCode], [s1].[ShipRegion], [s1].[ShipVia], [s1].[ShippedDate], [s1].[OrderID0], [s1].[ProductID], [s1].[ProductID0], [s1].[SupplierID], [s1].[ProductID1], [s1].[CategoryID], [s1].[Discontinued], [s1].[IsDeleted0], [s1].[PeriodEnd], [s1].[PeriodStart], [s1].[ProductName], [s1].[QuantityPerUnit], [s1].[ReorderLevel], [s1].[SupplierID0], [s1].[UnitPrice], [s1].[UnitsInStock], [s1].[UnitsOnOrder] +FROM [Products] AS [p] +LEFT JOIN ( + SELECT [o].[Discount], [o1].[OrderID], [o1].[CustomerID], [o1].[EmployeeID], [o1].[Freight], [o1].[IsDeleted], [o1].[OrderDate], [o1].[RequiredDate], [o1].[ShipAddress], [o1].[ShipCity], [o1].[ShipCountry], [o1].[ShipName], [o1].[ShipPostalCode], [o1].[ShipRegion], [o1].[ShipVia], [o1].[ShippedDate], [o].[OrderID] AS [OrderID0], [o].[ProductID], [p1].[ProductID] AS [ProductID0], [s0].[SupplierID], [p3].[ProductID] AS [ProductID1], [p3].[CategoryID], [p3].[Discontinued], [p3].[IsDeleted] AS [IsDeleted0], [p3].[PeriodEnd], [p3].[PeriodStart], [p3].[ProductName], [p3].[QuantityPerUnit], [p3].[ReorderLevel], [p3].[SupplierID] AS [SupplierID0], [p3].[UnitPrice], [p3].[UnitsInStock], [p3].[UnitsOnOrder] + FROM [Order Details] AS [o] + INNER JOIN ( + SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[Freight], [o0].[IsDeleted], [o0].[OrderDate], [o0].[RequiredDate], [o0].[ShipAddress], [o0].[ShipCity], [o0].[ShipCountry], [o0].[ShipName], [o0].[ShipPostalCode], [o0].[ShipRegion], [o0].[ShipVia], [o0].[ShippedDate] + FROM [Orders] AS [o0] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) + ) AS [o1] ON [o].[OrderID] = [o1].[OrderID] + INNER JOIN ( + SELECT [p0].[ProductID], [p0].[SupplierID] + FROM [Products] AS [p0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) + ) AS [p1] ON [o].[ProductID] = [p1].[ProductID] + LEFT JOIN ( + SELECT [s].[SupplierID] + FROM [Suppliers] AS [s] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [s].[IsDeleted] = CAST(0 AS bit) OR [s].[IsDeleted] = CAST(0 AS bit) + ) AS [s0] ON [p1].[SupplierID] = [s0].[SupplierID] + LEFT JOIN ( + SELECT [p2].[ProductID], [p2].[CategoryID], [p2].[Discontinued], [p2].[IsDeleted], [p2].[PeriodEnd], [p2].[PeriodStart], [p2].[ProductName], [p2].[QuantityPerUnit], [p2].[ReorderLevel], [p2].[SupplierID], [p2].[UnitPrice], [p2].[UnitsInStock], [p2].[UnitsOnOrder] + FROM [Products] AS [p2] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p2].[IsDeleted] = CAST(0 AS bit) OR [p2].[IsDeleted] = CAST(0 AS bit) + ) AS [p3] ON [s0].[SupplierID] = [p3].[SupplierID] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +) AS [s1] ON [p].[ProductID] = [s1].[ProductID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) +ORDER BY [p].[ProductID], [s1].[OrderID0], [s1].[ProductID], [s1].[OrderID], [s1].[ProductID0], [s1].[SupplierID] + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.2022.MS,False).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.2022.MS,False).sql new file mode 100644 index 00000000000..5e8fe75715c --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.2022.MS,False).sql @@ -0,0 +1,20 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [p1].[ProductID], [p1].[CategoryID], [p1].[Discontinued], [p1].[IsDeleted], [p1].[PeriodEnd], [p1].[PeriodStart], [p1].[ProductName], [p1].[QuantityPerUnit], [p1].[ReorderLevel], [p1].[SupplierID], [p1].[UnitPrice], [p1].[UnitsInStock], [p1].[UnitsOnOrder] +FROM [Products] AS [p] +CROSS JOIN ( + SELECT [p0].[ProductID], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Products] AS [p0] + WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit)) AND ( + SELECT COUNT(*) + FROM [Order Details] AS [o0] + WHERE (@__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit)) AND [p0].[ProductID] = [o0].[ProductID]) > 0 +) AS [p1] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND ( + SELECT COUNT(*) + FROM [Order Details] AS [o] + WHERE (@__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductID] = [o].[ProductID]) > 0 AND [p].[ProductID] = [p1].[ProductID] +ORDER BY [p].[ProductID] + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.2022.MS,True).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.2022.MS,True).sql new file mode 100644 index 00000000000..5e8fe75715c --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.2022.MS,True).sql @@ -0,0 +1,20 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [p1].[ProductID], [p1].[CategoryID], [p1].[Discontinued], [p1].[IsDeleted], [p1].[PeriodEnd], [p1].[PeriodStart], [p1].[ProductName], [p1].[QuantityPerUnit], [p1].[ReorderLevel], [p1].[SupplierID], [p1].[UnitPrice], [p1].[UnitsInStock], [p1].[UnitsOnOrder] +FROM [Products] AS [p] +CROSS JOIN ( + SELECT [p0].[ProductID], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Products] AS [p0] + WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit)) AND ( + SELECT COUNT(*) + FROM [Order Details] AS [o0] + WHERE (@__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit)) AND [p0].[ProductID] = [o0].[ProductID]) > 0 +) AS [p1] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND ( + SELECT COUNT(*) + FROM [Order Details] AS [o] + WHERE (@__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductID] = [o].[ProductID]) > 0 AND [p].[ProductID] = [p1].[ProductID] +ORDER BY [p].[ProductID] + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.2022.MS,False).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.2022.MS,False).sql new file mode 100644 index 00000000000..03ff17e1f17 --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.2022.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__test_0='?' (DbType = Int32) + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] +FROM [Employees] AS [e] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit)) AND [e].[EmployeeID] = @__test_0 + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.2022.MS,True).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.2022.MS,True).sql new file mode 100644 index 00000000000..03ff17e1f17 --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.2022.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__test_0='?' (DbType = Int32) + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] +FROM [Employees] AS [e] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit)) AND [e].[EmployeeID] = @__test_0 + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.2022.MS,False).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.2022.MS,False).sql new file mode 100644 index 00000000000..e047dc4281d --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.2022.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT TOP(1) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[IsDeleted], [c].[Phone], [c].[PostalCode], [c].[Region] +FROM [Customers] AS [c] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.2022.MS,True).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.2022.MS,True).sql new file mode 100644 index 00000000000..e047dc4281d --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.2022.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT TOP(1) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[IsDeleted], [c].[Phone], [c].[PostalCode], [c].[Region] +FROM [Customers] AS [c] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.2022.MS,False).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.2022.MS,False).sql new file mode 100644 index 00000000000..1d6793b0b8c --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.2022.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[QuantityPerUnit] AS [Quantity] +FROM [Products] AS [p] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.2022.MS,True).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.2022.MS,True).sql new file mode 100644 index 00000000000..1d6793b0b8c --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.2022.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[QuantityPerUnit] AS [Quantity] +FROM [Products] AS [p] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.2022.MS,False).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.2022.MS,False).sql new file mode 100644 index 00000000000..5853efae690 --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.2022.MS,False).sql @@ -0,0 +1,15 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +-- Tagged query + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy], [e1].[EmployeeID], [e1].[Address], [e1].[BirthDate], [e1].[City], [e1].[Country], [e1].[Extension], [e1].[FirstName], [e1].[HireDate], [e1].[HomePhone], [e1].[IsDeleted], [e1].[LastName], [e1].[Notes], [e1].[Photo], [e1].[PhotoPath], [e1].[PostalCode], [e1].[Region], [e1].[ReportsTo], [e1].[Title], [e1].[TitleOfCourtesy] +FROM [Employees] AS [e] +LEFT JOIN ( + SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy] + FROM [Employees] AS [e0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) +) AS [e1] ON [e].[ReportsTo] = [e1].[EmployeeID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.2022.MS,True).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.2022.MS,True).sql new file mode 100644 index 00000000000..5853efae690 --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.2022.MS,True).sql @@ -0,0 +1,15 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +-- Tagged query + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy], [e1].[EmployeeID], [e1].[Address], [e1].[BirthDate], [e1].[City], [e1].[Country], [e1].[Extension], [e1].[FirstName], [e1].[HireDate], [e1].[HomePhone], [e1].[IsDeleted], [e1].[LastName], [e1].[Notes], [e1].[Photo], [e1].[PhotoPath], [e1].[PostalCode], [e1].[Region], [e1].[ReportsTo], [e1].[Title], [e1].[TitleOfCourtesy] +FROM [Employees] AS [e] +LEFT JOIN ( + SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy] + FROM [Employees] AS [e0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) +) AS [e1] ON [e].[ReportsTo] = [e1].[EmployeeID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.2022.MS,False).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.2022.MS,False).sql new file mode 100644 index 00000000000..52ce94a469e --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.2022.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT MAX([p].[QuantityPerUnit]) +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'U%' + + diff --git a/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.2022.MS,True).sql b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.2022.MS,True).sql new file mode 100644 index 00000000000..52ce94a469e --- /dev/null +++ b/SqlServer.2022.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.2022.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT MAX([p].[QuantityPerUnit]) +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'U%' + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ConvertorTests/LinqToDB.EntityFrameworkCore.Tests.ConvertorTests.TestToList(SqlServer.Contained.MS).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ConvertorTests/LinqToDB.EntityFrameworkCore.Tests.ConvertorTests.TestToList(SqlServer.Contained.MS).sql new file mode 100644 index 00000000000..4509e56882e --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ConvertorTests/LinqToDB.EntityFrameworkCore.Tests.ConvertorTests.TestToList(SqlServer.Contained.MS).sql @@ -0,0 +1,5 @@ +SELECT [s].[Id], [s].[Code], [s].[IsDeleted], [s].[Name], [s].[PermanentId] +FROM [Subdivisions] AS [s] +WHERE CAST([s].[Id] AS bigint) = CAST(1 AS bigint) + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestAmbiguousProperties(SqlServer.Contained.MS).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestAmbiguousProperties(SqlServer.Contained.MS).sql new file mode 100644 index 00000000000..3c073d8eed0 --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestAmbiguousProperties(SqlServer.Contained.MS).sql @@ -0,0 +1,5 @@ +SELECT [w].[Id], [w].[Value] +FROM [WithDuplicateProperties] AS [w] +WHERE [w].[Value] = 1 + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestInheritance(SqlServer.Contained.MS).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestInheritance(SqlServer.Contained.MS).sql new file mode 100644 index 00000000000..40314a1747b --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestInheritance(SqlServer.Contained.MS).sql @@ -0,0 +1,17 @@ +Parameters: +@p0='?' (Size = 21), @p1='?' (Size = 21), @p2='?' (Size = 21), @p3='?' (Size = 21), @p4='?' (Size = 21) + +SET IMPLICIT_TRANSACTIONS OFF; +SET NOCOUNT ON; +MERGE [WithInheritance] USING ( +VALUES (@p0, 0), +(@p1, 1), +(@p2, 2), +(@p3, 3), +(@p4, 4)) AS i ([Discriminator], _Position) ON 1=0 +WHEN NOT MATCHED THEN +INSERT ([Discriminator]) +VALUES (i.[Discriminator]) +OUTPUT INSERTED.[Id], i._Position; + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestUIntTable(SqlServer.Contained.MS).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestUIntTable(SqlServer.Contained.MS).sql new file mode 100644 index 00000000000..1c910246616 --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestUIntTable(SqlServer.Contained.MS).sql @@ -0,0 +1,10 @@ +Parameters: +@p0='?' (DbType = Int32), @p1='?' (DbType = Int32), @p2='?' (DbType = Int64), @p3='?' (DbType = Int64), @p4='?' (Precision = 20) (DbType = Decimal), @p5='?' (Precision = 20) (DbType = Decimal) + +SET IMPLICIT_TRANSACTIONS OFF; +SET NOCOUNT ON; +INSERT INTO [UIntTable] ([Field16], [Field16N], [Field32], [Field32N], [Field64], [Field64N]) +OUTPUT INSERTED.[ID] +VALUES (@p0, @p1, @p2, @p3, @p4, @p5); + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.Contained.MS,Default).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.Contained.MS,Default).sql new file mode 100644 index 00000000000..d005c63a292 --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.Contained.MS,Default).sql @@ -0,0 +1,4 @@ +SELECT [b].[Id], [b].[BlogType], [b].[Url] +FROM [Blogs] AS [b] + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.Contained.MS,MultipleRows).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.Contained.MS,MultipleRows).sql new file mode 100644 index 00000000000..d005c63a292 --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.Contained.MS,MultipleRows).sql @@ -0,0 +1,4 @@ +SELECT [b].[Id], [b].[BlogType], [b].[Url] +FROM [Blogs] AS [b] + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.Contained.MS,ProviderSpecific).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.Contained.MS,ProviderSpecific).sql new file mode 100644 index 00000000000..d005c63a292 --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.Contained.MS,ProviderSpecific).sql @@ -0,0 +1,4 @@ +SELECT [b].[Id], [b].[BlogType], [b].[Url] +FROM [Blogs] AS [b] + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.Contained.MS,RowByRow).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.Contained.MS,RowByRow).sql new file mode 100644 index 00000000000..d005c63a292 --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.Contained.MS,RowByRow).sql @@ -0,0 +1,4 @@ +SELECT [b].[Id], [b].[BlogType], [b].[Url] +FROM [Blogs] AS [b] + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InterceptorTests/LinqToDB.EntityFrameworkCore.Tests.InterceptorTests.TestEfCoreSideOfComboInterceptor(SqlServer.Contained.MS).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InterceptorTests/LinqToDB.EntityFrameworkCore.Tests.InterceptorTests.TestEfCoreSideOfComboInterceptor(SqlServer.Contained.MS).sql new file mode 100644 index 00000000000..550d60442c5 --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InterceptorTests/LinqToDB.EntityFrameworkCore.Tests.InterceptorTests.TestEfCoreSideOfComboInterceptor(SqlServer.Contained.MS).sql @@ -0,0 +1,9 @@ +Parameters: +@__p_0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT TOP(@__p_0) [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductID] > 0 +ORDER BY [p].[ProductID] + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue117Test(SqlServer.Contained.MS).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue117Test(SqlServer.Contained.MS).sql new file mode 100644 index 00000000000..1e0723a91d2 --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue117Test(SqlServer.Contained.MS).sql @@ -0,0 +1,9 @@ +Parameters: +@__userId_1='?' (DbType = Int32), @__userId_0='?' (DbType = Int32) + +SELECT [p].[Id] AS [PatentId], @__userId_1 AS [UserId] +FROM [Patents] AS [p] +LEFT JOIN [PatentAssessment] AS [p0] ON [p].[Id] = [p0].[PatentId] +WHERE [p0].[PatentId] IS NULL OR [p0].[TechnicalReviewerId] <> @__userId_0 OR [p0].[TechnicalReviewerId] IS NULL + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue73Test(SqlServer.Contained.MS).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue73Test(SqlServer.Contained.MS).sql new file mode 100644 index 00000000000..6a6908a5aa9 --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue73Test(SqlServer.Contained.MS).sql @@ -0,0 +1,6 @@ +SELECT COALESCE([i0].[Name], N'') + N'>' + [i].[Name] +FROM [Issue73Entities] AS [i] +LEFT JOIN [Issue73Entities] AS [i0] ON [i].[ParentId] = [i0].[Id] +WHERE [i].[Name] = N'Name1_3' + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated(SqlServer.Contained.MS).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated(SqlServer.Contained.MS).sql new file mode 100644 index 00000000000..761b1ced8fe --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated(SqlServer.Contained.MS).sql @@ -0,0 +1,10 @@ +Parameters: +p0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [l].[CategoryID], [l].[CategoryName], [l].[Description], [l].[IsDeleted], [l].[Picture] +FROM ( + SELECT * FROM [dbo].[Categories] WHERE CategoryId = @p0 +) AS [l] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated2(SqlServer.Contained.MS).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated2(SqlServer.Contained.MS).sql new file mode 100644 index 00000000000..4e7025136cc --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated2(SqlServer.Contained.MS).sql @@ -0,0 +1,15 @@ +Parameters: +p0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [l0].[CategoryID], [l0].[CategoryName], [l0].[Description], [l0].[IsDeleted], [l0].[Picture] +FROM [Categories] AS [c] +CROSS JOIN ( + SELECT [l].[CategoryID], [l].[CategoryName], [l].[Description], [l].[IsDeleted], [l].[Picture] + FROM ( + SELECT * FROM [dbo].[Categories] WHERE CategoryId = @p0 + ) AS [l] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) +) AS [l0] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw(SqlServer.Contained.MS).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw(SqlServer.Contained.MS).sql new file mode 100644 index 00000000000..761b1ced8fe --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw(SqlServer.Contained.MS).sql @@ -0,0 +1,10 @@ +Parameters: +p0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [l].[CategoryID], [l].[CategoryName], [l].[Description], [l].[IsDeleted], [l].[Picture] +FROM ( + SELECT * FROM [dbo].[Categories] WHERE CategoryId = @p0 +) AS [l] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw2(SqlServer.Contained.MS).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw2(SqlServer.Contained.MS).sql new file mode 100644 index 00000000000..4e7025136cc --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw2(SqlServer.Contained.MS).sql @@ -0,0 +1,15 @@ +Parameters: +p0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [l0].[CategoryID], [l0].[CategoryName], [l0].[Description], [l0].[IsDeleted], [l0].[Picture] +FROM [Categories] AS [c] +CROSS JOIN ( + SELECT [l].[CategoryID], [l].[CategoryName], [l].[Description], [l].[IsDeleted], [l].[Picture] + FROM ( + SELECT * FROM [dbo].[Categories] WHERE CategoryId = @p0 + ) AS [l] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) +) AS [l0] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.NavigationProperties(SqlServer.Contained.MS).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.NavigationProperties(SqlServer.Contained.MS).sql new file mode 100644 index 00000000000..4787fb868ab --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.NavigationProperties(SqlServer.Contained.MS).sql @@ -0,0 +1,24 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o1].[OrderID], [o1].[ProductID], [p0].[ProductID], [o3].[OrderId], [o3].[ProductId], [o3].[Quantity], [o1].[Quantity], [p0].[ProductName] +FROM [Orders] AS [o] +INNER JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Quantity] + FROM [Order Details] AS [o0] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [o1] ON [o].[OrderID] = [o1].[OrderID] +INNER JOIN ( + SELECT [p].[ProductID], [p].[ProductName] + FROM [Products] AS [p] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) +) AS [p0] ON [o1].[ProductID] = [p0].[ProductID] +LEFT JOIN ( + SELECT [o2].[OrderID] AS [OrderId], [o2].[ProductID] AS [ProductId], [o2].[Quantity] + FROM [Order Details] AS [o2] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o2].[IsDeleted] = CAST(0 AS bit) OR [o2].[IsDeleted] = CAST(0 AS bit) +) AS [o3] ON [p0].[ProductID] = [o3].[ProductId] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [o1].[OrderID], [o1].[ProductID], [p0].[ProductID], [o3].[OrderId] + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.Contained.MS,False).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.Contained.MS,False).sql new file mode 100644 index 00000000000..d971cbfab3d --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.Contained.MS,False).sql @@ -0,0 +1,28 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%' + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%' + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT CASE + WHEN EXISTS ( + SELECT 1 + FROM [Products] AS [p] + WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%') THEN CAST(1 AS bit) + ELSE CAST(0 AS bit) +END + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.Contained.MS,True).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.Contained.MS,True).sql new file mode 100644 index 00000000000..d971cbfab3d --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.Contained.MS,True).sql @@ -0,0 +1,28 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%' + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%' + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT CASE + WHEN EXISTS ( + SELECT 1 + FROM [Products] AS [p] + WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%') THEN CAST(1 AS bit) + ELSE CAST(0 AS bit) +END + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.Contained.MS,False).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.Contained.MS,False).sql new file mode 100644 index 00000000000..5c143463885 --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.Contained.MS,False).sql @@ -0,0 +1,10 @@ +Parameters: +@p1='?' (DbType = Int32), @p2='?' (DbType = Int32), @p0='?' (DbType = Currency) + +SET IMPLICIT_TRANSACTIONS OFF; +SET NOCOUNT ON; +UPDATE [Order Details] SET [UnitPrice] = @p0 +OUTPUT 1 +WHERE [OrderID] = @p1 AND [ProductID] = @p2; + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.Contained.MS,True).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.Contained.MS,True).sql new file mode 100644 index 00000000000..5c143463885 --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.Contained.MS,True).sql @@ -0,0 +1,10 @@ +Parameters: +@p1='?' (DbType = Int32), @p2='?' (DbType = Int32), @p0='?' (DbType = Currency) + +SET IMPLICIT_TRANSACTIONS OFF; +SET NOCOUNT ON; +UPDATE [Order Details] SET [UnitPrice] = @p0 +OUTPUT 1 +WHERE [OrderID] = @p1 AND [ProductID] = @p2; + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestCommandTimeout(SqlServer.Contained.MS).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestCommandTimeout(SqlServer.Contained.MS).sql new file mode 100644 index 00000000000..54eea14853c --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestCommandTimeout(SqlServer.Contained.MS).sql @@ -0,0 +1,19 @@ +CREATE OR ALTER FUNCTION dbo.[ProcessLong] + ( + @secondsNumber int + ) + RETURNS int + AS + BEGIN + declare @startTime datetime = getutcdate() + while datediff(second, @startTime, getutcdate()) < @secondsNumber + begin + set @startTime = @startTime + end + return 1 + END + + +DROP FUNCTION IF EXISTS [dbo].[ProcessLong] + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.Contained.MS,False).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.Contained.MS,False).sql new file mode 100644 index 00000000000..26064712104 --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.Contained.MS,False).sql @@ -0,0 +1,24 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [s].[OrderID], [s].[ProductID], [s].[Discount], [s].[IsDeleted], [s].[Quantity], [s].[UnitPrice], [s].[ProductID0], [s].[CategoryID], [s].[Discontinued], [s].[IsDeleted0], [s].[PeriodEnd], [s].[PeriodStart], [s].[ProductName], [s].[QuantityPerUnit], [s].[ReorderLevel], [s].[SupplierID], [s].[UnitPrice0], [s].[UnitsInStock], [s].[UnitsOnOrder], [s].[OrderID0], [s].[ProductID1], [s].[Discount0], [s].[IsDeleted1], [s].[Quantity0], [s].[UnitPrice1] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder], [o2].[OrderID] AS [OrderID0], [o2].[ProductID] AS [ProductID1], [o2].[Discount] AS [Discount0], [o2].[IsDeleted] AS [IsDeleted1], [o2].[Quantity] AS [Quantity0], [o2].[UnitPrice] AS [UnitPrice1] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + LEFT JOIN ( + SELECT [o1].[OrderID], [o1].[ProductID], [o1].[Discount], [o1].[IsDeleted], [o1].[Quantity], [o1].[UnitPrice] + FROM [Order Details] AS [o1] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o1].[IsDeleted] = CAST(0 AS bit) OR [o1].[IsDeleted] = CAST(0 AS bit) + ) AS [o2] ON [p0].[ProductID] = [o2].[ProductID] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [o].[OrderID] = [s].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [s].[OrderID], [s].[ProductID], [s].[ProductID0], [s].[OrderID0] + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.Contained.MS,True).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.Contained.MS,True).sql new file mode 100644 index 00000000000..26064712104 --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.Contained.MS,True).sql @@ -0,0 +1,24 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [s].[OrderID], [s].[ProductID], [s].[Discount], [s].[IsDeleted], [s].[Quantity], [s].[UnitPrice], [s].[ProductID0], [s].[CategoryID], [s].[Discontinued], [s].[IsDeleted0], [s].[PeriodEnd], [s].[PeriodStart], [s].[ProductName], [s].[QuantityPerUnit], [s].[ReorderLevel], [s].[SupplierID], [s].[UnitPrice0], [s].[UnitsInStock], [s].[UnitsOnOrder], [s].[OrderID0], [s].[ProductID1], [s].[Discount0], [s].[IsDeleted1], [s].[Quantity0], [s].[UnitPrice1] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder], [o2].[OrderID] AS [OrderID0], [o2].[ProductID] AS [ProductID1], [o2].[Discount] AS [Discount0], [o2].[IsDeleted] AS [IsDeleted1], [o2].[Quantity] AS [Quantity0], [o2].[UnitPrice] AS [UnitPrice1] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + LEFT JOIN ( + SELECT [o1].[OrderID], [o1].[ProductID], [o1].[Discount], [o1].[IsDeleted], [o1].[Quantity], [o1].[UnitPrice] + FROM [Order Details] AS [o1] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o1].[IsDeleted] = CAST(0 AS bit) OR [o1].[IsDeleted] = CAST(0 AS bit) + ) AS [o2] ON [p0].[ProductID] = [o2].[ProductID] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [o].[OrderID] = [s].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [s].[OrderID], [s].[ProductID], [s].[ProductID0], [s].[OrderID0] + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.Contained.MS,False).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.Contained.MS,False).sql new file mode 100644 index 00000000000..ea7933460c5 --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.Contained.MS,False).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [o].[OrderID], [s].[EmployeeID], [s].[TerritoryID], [s].[IsDeleted], [s].[TerritoryID0], [s].[IsDeleted0], [s].[RegionID], [s].[TerritoryDescription], [s0].[OrderID], [s0].[ProductID], [s0].[Discount], [s0].[IsDeleted], [s0].[Quantity], [s0].[UnitPrice], [s0].[ProductID0], [s0].[CategoryID], [s0].[Discontinued], [s0].[IsDeleted0], [s0].[PeriodEnd], [s0].[PeriodStart], [s0].[ProductName], [s0].[QuantityPerUnit], [s0].[ReorderLevel], [s0].[SupplierID], [s0].[UnitPrice0], [s0].[UnitsInStock], [s0].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted], [t0].[TerritoryID] AS [TerritoryID0], [t0].[IsDeleted] AS [IsDeleted0], [t0].[RegionID], [t0].[TerritoryDescription] + FROM [EmployeeTerritories] AS [e1] + INNER JOIN ( + SELECT [t].[TerritoryID], [t].[IsDeleted], [t].[RegionID], [t].[TerritoryDescription] + FROM [Territories] AS [t] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) + ) AS [t0] ON [e1].[TerritoryID] = [t0].[TerritoryID] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [e0].[EmployeeID] = [s].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_5 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s0] ON [o].[OrderID] = [s0].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [s].[EmployeeID], [s].[TerritoryID], [s].[TerritoryID0], [s0].[OrderID], [s0].[ProductID] + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.Contained.MS,True).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.Contained.MS,True).sql new file mode 100644 index 00000000000..ea7933460c5 --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.Contained.MS,True).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [o].[OrderID], [s].[EmployeeID], [s].[TerritoryID], [s].[IsDeleted], [s].[TerritoryID0], [s].[IsDeleted0], [s].[RegionID], [s].[TerritoryDescription], [s0].[OrderID], [s0].[ProductID], [s0].[Discount], [s0].[IsDeleted], [s0].[Quantity], [s0].[UnitPrice], [s0].[ProductID0], [s0].[CategoryID], [s0].[Discontinued], [s0].[IsDeleted0], [s0].[PeriodEnd], [s0].[PeriodStart], [s0].[ProductName], [s0].[QuantityPerUnit], [s0].[ReorderLevel], [s0].[SupplierID], [s0].[UnitPrice0], [s0].[UnitsInStock], [s0].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted], [t0].[TerritoryID] AS [TerritoryID0], [t0].[IsDeleted] AS [IsDeleted0], [t0].[RegionID], [t0].[TerritoryDescription] + FROM [EmployeeTerritories] AS [e1] + INNER JOIN ( + SELECT [t].[TerritoryID], [t].[IsDeleted], [t].[RegionID], [t].[TerritoryDescription] + FROM [Territories] AS [t] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) + ) AS [t0] ON [e1].[TerritoryID] = [t0].[TerritoryID] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [e0].[EmployeeID] = [s].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_5 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s0] ON [o].[OrderID] = [s0].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [s].[EmployeeID], [s].[TerritoryID], [s].[TerritoryID0], [s0].[OrderID], [s0].[ProductID] + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.Contained.MS,False).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.Contained.MS,False).sql new file mode 100644 index 00000000000..1b9ca7c0743 --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.Contained.MS,False).sql @@ -0,0 +1,13 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy], [e1].[EmployeeID], [e1].[Address], [e1].[BirthDate], [e1].[City], [e1].[Country], [e1].[Extension], [e1].[FirstName], [e1].[HireDate], [e1].[HomePhone], [e1].[IsDeleted], [e1].[LastName], [e1].[Notes], [e1].[Photo], [e1].[PhotoPath], [e1].[PostalCode], [e1].[Region], [e1].[ReportsTo], [e1].[Title], [e1].[TitleOfCourtesy] +FROM [Employees] AS [e] +LEFT JOIN ( + SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy] + FROM [Employees] AS [e0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) +) AS [e1] ON [e].[ReportsTo] = [e1].[EmployeeID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.Contained.MS,True).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.Contained.MS,True).sql new file mode 100644 index 00000000000..1b9ca7c0743 --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.Contained.MS,True).sql @@ -0,0 +1,13 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy], [e1].[EmployeeID], [e1].[Address], [e1].[BirthDate], [e1].[City], [e1].[Country], [e1].[Extension], [e1].[FirstName], [e1].[HireDate], [e1].[HomePhone], [e1].[IsDeleted], [e1].[LastName], [e1].[Notes], [e1].[Photo], [e1].[PhotoPath], [e1].[PostalCode], [e1].[Region], [e1].[ReportsTo], [e1].[Title], [e1].[TitleOfCourtesy] +FROM [Employees] AS [e] +LEFT JOIN ( + SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy] + FROM [Employees] AS [e0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) +) AS [e1] ON [e].[ReportsTo] = [e1].[EmployeeID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.Contained.MS,False).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.Contained.MS,False).sql new file mode 100644 index 00000000000..3180e5e2124 --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.Contained.MS,False).sql @@ -0,0 +1,18 @@ +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[IsDeleted], [o].[Quantity], [o].[UnitPrice] +FROM [Products] AS [p] +INNER JOIN [Order Details] AS [o] ON [p].[ProductID] = [o].[ProductID] + + +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice] +FROM [Products] AS [p] +INNER JOIN ( + SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[IsDeleted], [o].[Quantity], [o].[UnitPrice] + FROM [Order Details] AS [o] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +) AS [o0] ON [p].[ProductID] = [o0].[ProductID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.Contained.MS,True).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.Contained.MS,True).sql new file mode 100644 index 00000000000..3180e5e2124 --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.Contained.MS,True).sql @@ -0,0 +1,18 @@ +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[IsDeleted], [o].[Quantity], [o].[UnitPrice] +FROM [Products] AS [p] +INNER JOIN [Order Details] AS [o] ON [p].[ProductID] = [o].[ProductID] + + +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice] +FROM [Products] AS [p] +INNER JOIN ( + SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[IsDeleted], [o].[Quantity], [o].[UnitPrice] + FROM [Order Details] AS [o] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +) AS [o0] ON [p].[ProductID] = [o0].[ProductID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.Contained.MS,False).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.Contained.MS,False).sql new file mode 100644 index 00000000000..d17a1454daa --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.Contained.MS,False).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [s].[EmployeeID], [s].[TerritoryID], [s].[IsDeleted], [s].[TerritoryID0], [s].[IsDeleted0], [s].[RegionID], [s].[TerritoryDescription], [s0].[OrderID], [s0].[ProductID], [s0].[Discount], [s0].[IsDeleted], [s0].[Quantity], [s0].[UnitPrice], [s0].[ProductID0], [s0].[CategoryID], [s0].[Discontinued], [s0].[IsDeleted0], [s0].[PeriodEnd], [s0].[PeriodStart], [s0].[ProductName], [s0].[QuantityPerUnit], [s0].[ReorderLevel], [s0].[SupplierID], [s0].[UnitPrice0], [s0].[UnitsInStock], [s0].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted], [t0].[TerritoryID] AS [TerritoryID0], [t0].[IsDeleted] AS [IsDeleted0], [t0].[RegionID], [t0].[TerritoryDescription] + FROM [EmployeeTerritories] AS [e1] + INNER JOIN ( + SELECT [t].[TerritoryID], [t].[IsDeleted], [t].[RegionID], [t].[TerritoryDescription] + FROM [Territories] AS [t] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) + ) AS [t0] ON [e1].[TerritoryID] = [t0].[TerritoryID] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [e0].[EmployeeID] = [s].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_5 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s0] ON [o].[OrderID] = [s0].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [s].[EmployeeID], [s].[TerritoryID], [s].[TerritoryID0], [s0].[OrderID], [s0].[ProductID] + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.Contained.MS,True).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.Contained.MS,True).sql new file mode 100644 index 00000000000..d17a1454daa --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.Contained.MS,True).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [s].[EmployeeID], [s].[TerritoryID], [s].[IsDeleted], [s].[TerritoryID0], [s].[IsDeleted0], [s].[RegionID], [s].[TerritoryDescription], [s0].[OrderID], [s0].[ProductID], [s0].[Discount], [s0].[IsDeleted], [s0].[Quantity], [s0].[UnitPrice], [s0].[ProductID0], [s0].[CategoryID], [s0].[Discontinued], [s0].[IsDeleted0], [s0].[PeriodEnd], [s0].[PeriodStart], [s0].[ProductName], [s0].[QuantityPerUnit], [s0].[ReorderLevel], [s0].[SupplierID], [s0].[UnitPrice0], [s0].[UnitsInStock], [s0].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted], [t0].[TerritoryID] AS [TerritoryID0], [t0].[IsDeleted] AS [IsDeleted0], [t0].[RegionID], [t0].[TerritoryDescription] + FROM [EmployeeTerritories] AS [e1] + INNER JOIN ( + SELECT [t].[TerritoryID], [t].[IsDeleted], [t].[RegionID], [t].[TerritoryDescription] + FROM [Territories] AS [t] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) + ) AS [t0] ON [e1].[TerritoryID] = [t0].[TerritoryID] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [e0].[EmployeeID] = [s].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_5 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s0] ON [o].[OrderID] = [s0].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [s].[EmployeeID], [s].[TerritoryID], [s].[TerritoryID0], [s0].[OrderID], [s0].[ProductID] + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.Contained.MS,False).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.Contained.MS,False).sql new file mode 100644 index 00000000000..def257d2102 --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.Contained.MS,False).sql @@ -0,0 +1,29 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [e2].[EmployeeID], [e2].[TerritoryID], [e2].[IsDeleted], [s].[OrderID], [s].[ProductID], [s].[Discount], [s].[IsDeleted], [s].[Quantity], [s].[UnitPrice], [s].[ProductID0], [s].[CategoryID], [s].[Discontinued], [s].[IsDeleted0], [s].[PeriodEnd], [s].[PeriodStart], [s].[ProductName], [s].[QuantityPerUnit], [s].[ReorderLevel], [s].[SupplierID], [s].[UnitPrice0], [s].[UnitsInStock], [s].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted] + FROM [EmployeeTerritories] AS [e1] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [e2] ON [e0].[EmployeeID] = [e2].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [o].[OrderID] = [s].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [e2].[EmployeeID], [e2].[TerritoryID], [s].[OrderID], [s].[ProductID] + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.Contained.MS,True).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.Contained.MS,True).sql new file mode 100644 index 00000000000..def257d2102 --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.Contained.MS,True).sql @@ -0,0 +1,29 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [e2].[EmployeeID], [e2].[TerritoryID], [e2].[IsDeleted], [s].[OrderID], [s].[ProductID], [s].[Discount], [s].[IsDeleted], [s].[Quantity], [s].[UnitPrice], [s].[ProductID0], [s].[CategoryID], [s].[Discontinued], [s].[IsDeleted0], [s].[PeriodEnd], [s].[PeriodStart], [s].[ProductName], [s].[QuantityPerUnit], [s].[ReorderLevel], [s].[SupplierID], [s].[UnitPrice0], [s].[UnitsInStock], [s].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted] + FROM [EmployeeTerritories] AS [e1] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [e2] ON [e0].[EmployeeID] = [e2].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [o].[OrderID] = [s].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [e2].[EmployeeID], [e2].[TerritoryID], [s].[OrderID], [s].[ProductID] + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.Contained.MS,False).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.Contained.MS,False).sql new file mode 100644 index 00000000000..76f07dd62df --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.Contained.MS,False).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT [p].[ProductName], [p].[ProductID], [s1].[Discount], [s1].[OrderID], [s1].[CustomerID], [s1].[EmployeeID], [s1].[Freight], [s1].[IsDeleted], [s1].[OrderDate], [s1].[RequiredDate], [s1].[ShipAddress], [s1].[ShipCity], [s1].[ShipCountry], [s1].[ShipName], [s1].[ShipPostalCode], [s1].[ShipRegion], [s1].[ShipVia], [s1].[ShippedDate], [s1].[OrderID0], [s1].[ProductID], [s1].[ProductID0], [s1].[SupplierID], [s1].[ProductID1], [s1].[CategoryID], [s1].[Discontinued], [s1].[IsDeleted0], [s1].[PeriodEnd], [s1].[PeriodStart], [s1].[ProductName], [s1].[QuantityPerUnit], [s1].[ReorderLevel], [s1].[SupplierID0], [s1].[UnitPrice], [s1].[UnitsInStock], [s1].[UnitsOnOrder] +FROM [Products] AS [p] +LEFT JOIN ( + SELECT [o].[Discount], [o1].[OrderID], [o1].[CustomerID], [o1].[EmployeeID], [o1].[Freight], [o1].[IsDeleted], [o1].[OrderDate], [o1].[RequiredDate], [o1].[ShipAddress], [o1].[ShipCity], [o1].[ShipCountry], [o1].[ShipName], [o1].[ShipPostalCode], [o1].[ShipRegion], [o1].[ShipVia], [o1].[ShippedDate], [o].[OrderID] AS [OrderID0], [o].[ProductID], [p1].[ProductID] AS [ProductID0], [s0].[SupplierID], [p3].[ProductID] AS [ProductID1], [p3].[CategoryID], [p3].[Discontinued], [p3].[IsDeleted] AS [IsDeleted0], [p3].[PeriodEnd], [p3].[PeriodStart], [p3].[ProductName], [p3].[QuantityPerUnit], [p3].[ReorderLevel], [p3].[SupplierID] AS [SupplierID0], [p3].[UnitPrice], [p3].[UnitsInStock], [p3].[UnitsOnOrder] + FROM [Order Details] AS [o] + INNER JOIN ( + SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[Freight], [o0].[IsDeleted], [o0].[OrderDate], [o0].[RequiredDate], [o0].[ShipAddress], [o0].[ShipCity], [o0].[ShipCountry], [o0].[ShipName], [o0].[ShipPostalCode], [o0].[ShipRegion], [o0].[ShipVia], [o0].[ShippedDate] + FROM [Orders] AS [o0] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) + ) AS [o1] ON [o].[OrderID] = [o1].[OrderID] + INNER JOIN ( + SELECT [p0].[ProductID], [p0].[SupplierID] + FROM [Products] AS [p0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) + ) AS [p1] ON [o].[ProductID] = [p1].[ProductID] + LEFT JOIN ( + SELECT [s].[SupplierID] + FROM [Suppliers] AS [s] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [s].[IsDeleted] = CAST(0 AS bit) OR [s].[IsDeleted] = CAST(0 AS bit) + ) AS [s0] ON [p1].[SupplierID] = [s0].[SupplierID] + LEFT JOIN ( + SELECT [p2].[ProductID], [p2].[CategoryID], [p2].[Discontinued], [p2].[IsDeleted], [p2].[PeriodEnd], [p2].[PeriodStart], [p2].[ProductName], [p2].[QuantityPerUnit], [p2].[ReorderLevel], [p2].[SupplierID], [p2].[UnitPrice], [p2].[UnitsInStock], [p2].[UnitsOnOrder] + FROM [Products] AS [p2] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p2].[IsDeleted] = CAST(0 AS bit) OR [p2].[IsDeleted] = CAST(0 AS bit) + ) AS [p3] ON [s0].[SupplierID] = [p3].[SupplierID] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +) AS [s1] ON [p].[ProductID] = [s1].[ProductID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) +ORDER BY [p].[ProductID], [s1].[OrderID0], [s1].[ProductID], [s1].[OrderID], [s1].[ProductID0], [s1].[SupplierID] + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.Contained.MS,True).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.Contained.MS,True).sql new file mode 100644 index 00000000000..76f07dd62df --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.Contained.MS,True).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT [p].[ProductName], [p].[ProductID], [s1].[Discount], [s1].[OrderID], [s1].[CustomerID], [s1].[EmployeeID], [s1].[Freight], [s1].[IsDeleted], [s1].[OrderDate], [s1].[RequiredDate], [s1].[ShipAddress], [s1].[ShipCity], [s1].[ShipCountry], [s1].[ShipName], [s1].[ShipPostalCode], [s1].[ShipRegion], [s1].[ShipVia], [s1].[ShippedDate], [s1].[OrderID0], [s1].[ProductID], [s1].[ProductID0], [s1].[SupplierID], [s1].[ProductID1], [s1].[CategoryID], [s1].[Discontinued], [s1].[IsDeleted0], [s1].[PeriodEnd], [s1].[PeriodStart], [s1].[ProductName], [s1].[QuantityPerUnit], [s1].[ReorderLevel], [s1].[SupplierID0], [s1].[UnitPrice], [s1].[UnitsInStock], [s1].[UnitsOnOrder] +FROM [Products] AS [p] +LEFT JOIN ( + SELECT [o].[Discount], [o1].[OrderID], [o1].[CustomerID], [o1].[EmployeeID], [o1].[Freight], [o1].[IsDeleted], [o1].[OrderDate], [o1].[RequiredDate], [o1].[ShipAddress], [o1].[ShipCity], [o1].[ShipCountry], [o1].[ShipName], [o1].[ShipPostalCode], [o1].[ShipRegion], [o1].[ShipVia], [o1].[ShippedDate], [o].[OrderID] AS [OrderID0], [o].[ProductID], [p1].[ProductID] AS [ProductID0], [s0].[SupplierID], [p3].[ProductID] AS [ProductID1], [p3].[CategoryID], [p3].[Discontinued], [p3].[IsDeleted] AS [IsDeleted0], [p3].[PeriodEnd], [p3].[PeriodStart], [p3].[ProductName], [p3].[QuantityPerUnit], [p3].[ReorderLevel], [p3].[SupplierID] AS [SupplierID0], [p3].[UnitPrice], [p3].[UnitsInStock], [p3].[UnitsOnOrder] + FROM [Order Details] AS [o] + INNER JOIN ( + SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[Freight], [o0].[IsDeleted], [o0].[OrderDate], [o0].[RequiredDate], [o0].[ShipAddress], [o0].[ShipCity], [o0].[ShipCountry], [o0].[ShipName], [o0].[ShipPostalCode], [o0].[ShipRegion], [o0].[ShipVia], [o0].[ShippedDate] + FROM [Orders] AS [o0] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) + ) AS [o1] ON [o].[OrderID] = [o1].[OrderID] + INNER JOIN ( + SELECT [p0].[ProductID], [p0].[SupplierID] + FROM [Products] AS [p0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) + ) AS [p1] ON [o].[ProductID] = [p1].[ProductID] + LEFT JOIN ( + SELECT [s].[SupplierID] + FROM [Suppliers] AS [s] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [s].[IsDeleted] = CAST(0 AS bit) OR [s].[IsDeleted] = CAST(0 AS bit) + ) AS [s0] ON [p1].[SupplierID] = [s0].[SupplierID] + LEFT JOIN ( + SELECT [p2].[ProductID], [p2].[CategoryID], [p2].[Discontinued], [p2].[IsDeleted], [p2].[PeriodEnd], [p2].[PeriodStart], [p2].[ProductName], [p2].[QuantityPerUnit], [p2].[ReorderLevel], [p2].[SupplierID], [p2].[UnitPrice], [p2].[UnitsInStock], [p2].[UnitsOnOrder] + FROM [Products] AS [p2] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p2].[IsDeleted] = CAST(0 AS bit) OR [p2].[IsDeleted] = CAST(0 AS bit) + ) AS [p3] ON [s0].[SupplierID] = [p3].[SupplierID] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +) AS [s1] ON [p].[ProductID] = [s1].[ProductID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) +ORDER BY [p].[ProductID], [s1].[OrderID0], [s1].[ProductID], [s1].[OrderID], [s1].[ProductID0], [s1].[SupplierID] + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.Contained.MS,False).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.Contained.MS,False).sql new file mode 100644 index 00000000000..5e8fe75715c --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.Contained.MS,False).sql @@ -0,0 +1,20 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [p1].[ProductID], [p1].[CategoryID], [p1].[Discontinued], [p1].[IsDeleted], [p1].[PeriodEnd], [p1].[PeriodStart], [p1].[ProductName], [p1].[QuantityPerUnit], [p1].[ReorderLevel], [p1].[SupplierID], [p1].[UnitPrice], [p1].[UnitsInStock], [p1].[UnitsOnOrder] +FROM [Products] AS [p] +CROSS JOIN ( + SELECT [p0].[ProductID], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Products] AS [p0] + WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit)) AND ( + SELECT COUNT(*) + FROM [Order Details] AS [o0] + WHERE (@__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit)) AND [p0].[ProductID] = [o0].[ProductID]) > 0 +) AS [p1] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND ( + SELECT COUNT(*) + FROM [Order Details] AS [o] + WHERE (@__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductID] = [o].[ProductID]) > 0 AND [p].[ProductID] = [p1].[ProductID] +ORDER BY [p].[ProductID] + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.Contained.MS,True).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.Contained.MS,True).sql new file mode 100644 index 00000000000..5e8fe75715c --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.Contained.MS,True).sql @@ -0,0 +1,20 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [p1].[ProductID], [p1].[CategoryID], [p1].[Discontinued], [p1].[IsDeleted], [p1].[PeriodEnd], [p1].[PeriodStart], [p1].[ProductName], [p1].[QuantityPerUnit], [p1].[ReorderLevel], [p1].[SupplierID], [p1].[UnitPrice], [p1].[UnitsInStock], [p1].[UnitsOnOrder] +FROM [Products] AS [p] +CROSS JOIN ( + SELECT [p0].[ProductID], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Products] AS [p0] + WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit)) AND ( + SELECT COUNT(*) + FROM [Order Details] AS [o0] + WHERE (@__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit)) AND [p0].[ProductID] = [o0].[ProductID]) > 0 +) AS [p1] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND ( + SELECT COUNT(*) + FROM [Order Details] AS [o] + WHERE (@__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductID] = [o].[ProductID]) > 0 AND [p].[ProductID] = [p1].[ProductID] +ORDER BY [p].[ProductID] + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.Contained.MS,False).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.Contained.MS,False).sql new file mode 100644 index 00000000000..03ff17e1f17 --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.Contained.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__test_0='?' (DbType = Int32) + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] +FROM [Employees] AS [e] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit)) AND [e].[EmployeeID] = @__test_0 + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.Contained.MS,True).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.Contained.MS,True).sql new file mode 100644 index 00000000000..03ff17e1f17 --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.Contained.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__test_0='?' (DbType = Int32) + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] +FROM [Employees] AS [e] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit)) AND [e].[EmployeeID] = @__test_0 + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.Contained.MS,False).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.Contained.MS,False).sql new file mode 100644 index 00000000000..e047dc4281d --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.Contained.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT TOP(1) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[IsDeleted], [c].[Phone], [c].[PostalCode], [c].[Region] +FROM [Customers] AS [c] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.Contained.MS,True).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.Contained.MS,True).sql new file mode 100644 index 00000000000..e047dc4281d --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.Contained.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT TOP(1) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[IsDeleted], [c].[Phone], [c].[PostalCode], [c].[Region] +FROM [Customers] AS [c] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.Contained.MS,False).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.Contained.MS,False).sql new file mode 100644 index 00000000000..1d6793b0b8c --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.Contained.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[QuantityPerUnit] AS [Quantity] +FROM [Products] AS [p] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.Contained.MS,True).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.Contained.MS,True).sql new file mode 100644 index 00000000000..1d6793b0b8c --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.Contained.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[QuantityPerUnit] AS [Quantity] +FROM [Products] AS [p] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.Contained.MS,False).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.Contained.MS,False).sql new file mode 100644 index 00000000000..5853efae690 --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.Contained.MS,False).sql @@ -0,0 +1,15 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +-- Tagged query + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy], [e1].[EmployeeID], [e1].[Address], [e1].[BirthDate], [e1].[City], [e1].[Country], [e1].[Extension], [e1].[FirstName], [e1].[HireDate], [e1].[HomePhone], [e1].[IsDeleted], [e1].[LastName], [e1].[Notes], [e1].[Photo], [e1].[PhotoPath], [e1].[PostalCode], [e1].[Region], [e1].[ReportsTo], [e1].[Title], [e1].[TitleOfCourtesy] +FROM [Employees] AS [e] +LEFT JOIN ( + SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy] + FROM [Employees] AS [e0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) +) AS [e1] ON [e].[ReportsTo] = [e1].[EmployeeID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.Contained.MS,True).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.Contained.MS,True).sql new file mode 100644 index 00000000000..5853efae690 --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.Contained.MS,True).sql @@ -0,0 +1,15 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +-- Tagged query + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy], [e1].[EmployeeID], [e1].[Address], [e1].[BirthDate], [e1].[City], [e1].[Country], [e1].[Extension], [e1].[FirstName], [e1].[HireDate], [e1].[HomePhone], [e1].[IsDeleted], [e1].[LastName], [e1].[Notes], [e1].[Photo], [e1].[PhotoPath], [e1].[PostalCode], [e1].[Region], [e1].[ReportsTo], [e1].[Title], [e1].[TitleOfCourtesy] +FROM [Employees] AS [e] +LEFT JOIN ( + SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy] + FROM [Employees] AS [e0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) +) AS [e1] ON [e].[ReportsTo] = [e1].[EmployeeID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.Contained.MS,False).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.Contained.MS,False).sql new file mode 100644 index 00000000000..52ce94a469e --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.Contained.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT MAX([p].[QuantityPerUnit]) +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'U%' + + diff --git a/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.Contained.MS,True).sql b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.Contained.MS,True).sql new file mode 100644 index 00000000000..52ce94a469e --- /dev/null +++ b/SqlServer.Contained.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.Contained.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT MAX([p].[QuantityPerUnit]) +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'U%' + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ConvertorTests/LinqToDB.EntityFrameworkCore.Tests.ConvertorTests.TestToList(SqlServer.SA.MS).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ConvertorTests/LinqToDB.EntityFrameworkCore.Tests.ConvertorTests.TestToList(SqlServer.SA.MS).sql new file mode 100644 index 00000000000..4509e56882e --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ConvertorTests/LinqToDB.EntityFrameworkCore.Tests.ConvertorTests.TestToList(SqlServer.SA.MS).sql @@ -0,0 +1,5 @@ +SELECT [s].[Id], [s].[Code], [s].[IsDeleted], [s].[Name], [s].[PermanentId] +FROM [Subdivisions] AS [s] +WHERE CAST([s].[Id] AS bigint) = CAST(1 AS bigint) + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestAmbiguousProperties(SqlServer.SA.MS).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestAmbiguousProperties(SqlServer.SA.MS).sql new file mode 100644 index 00000000000..3c073d8eed0 --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestAmbiguousProperties(SqlServer.SA.MS).sql @@ -0,0 +1,5 @@ +SELECT [w].[Id], [w].[Value] +FROM [WithDuplicateProperties] AS [w] +WHERE [w].[Value] = 1 + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestInheritance(SqlServer.SA.MS).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestInheritance(SqlServer.SA.MS).sql new file mode 100644 index 00000000000..40314a1747b --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestInheritance(SqlServer.SA.MS).sql @@ -0,0 +1,17 @@ +Parameters: +@p0='?' (Size = 21), @p1='?' (Size = 21), @p2='?' (Size = 21), @p3='?' (Size = 21), @p4='?' (Size = 21) + +SET IMPLICIT_TRANSACTIONS OFF; +SET NOCOUNT ON; +MERGE [WithInheritance] USING ( +VALUES (@p0, 0), +(@p1, 1), +(@p2, 2), +(@p3, 3), +(@p4, 4)) AS i ([Discriminator], _Position) ON 1=0 +WHEN NOT MATCHED THEN +INSERT ([Discriminator]) +VALUES (i.[Discriminator]) +OUTPUT INSERTED.[Id], i._Position; + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestUIntTable(SqlServer.SA.MS).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestUIntTable(SqlServer.SA.MS).sql new file mode 100644 index 00000000000..1c910246616 --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ForMappingTests/LinqToDB.EntityFrameworkCore.Tests.ForMappingTests.TestUIntTable(SqlServer.SA.MS).sql @@ -0,0 +1,10 @@ +Parameters: +@p0='?' (DbType = Int32), @p1='?' (DbType = Int32), @p2='?' (DbType = Int64), @p3='?' (DbType = Int64), @p4='?' (Precision = 20) (DbType = Decimal), @p5='?' (Precision = 20) (DbType = Decimal) + +SET IMPLICIT_TRANSACTIONS OFF; +SET NOCOUNT ON; +INSERT INTO [UIntTable] ([Field16], [Field16N], [Field32], [Field32N], [Field64], [Field64N]) +OUTPUT INSERTED.[ID] +VALUES (@p0, @p1, @p2, @p3, @p4, @p5); + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.SA.MS,Default).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.SA.MS,Default).sql new file mode 100644 index 00000000000..d005c63a292 --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.SA.MS,Default).sql @@ -0,0 +1,4 @@ +SELECT [b].[Id], [b].[BlogType], [b].[Url] +FROM [Blogs] AS [b] + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.SA.MS,MultipleRows).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.SA.MS,MultipleRows).sql new file mode 100644 index 00000000000..d005c63a292 --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.SA.MS,MultipleRows).sql @@ -0,0 +1,4 @@ +SELECT [b].[Id], [b].[BlogType], [b].[Url] +FROM [Blogs] AS [b] + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.SA.MS,ProviderSpecific).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.SA.MS,ProviderSpecific).sql new file mode 100644 index 00000000000..d005c63a292 --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.SA.MS,ProviderSpecific).sql @@ -0,0 +1,4 @@ +SELECT [b].[Id], [b].[BlogType], [b].[Url] +FROM [Blogs] AS [b] + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.SA.MS,RowByRow).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.SA.MS,RowByRow).sql new file mode 100644 index 00000000000..d005c63a292 --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InheritanceTests/LinqToDB.EntityFrameworkCore.Tests.InheritanceTests.TestInheritanceBulkCopy(SqlServer.SA.MS,RowByRow).sql @@ -0,0 +1,4 @@ +SELECT [b].[Id], [b].[BlogType], [b].[Url] +FROM [Blogs] AS [b] + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InterceptorTests/LinqToDB.EntityFrameworkCore.Tests.InterceptorTests.TestEfCoreSideOfComboInterceptor(SqlServer.SA.MS).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InterceptorTests/LinqToDB.EntityFrameworkCore.Tests.InterceptorTests.TestEfCoreSideOfComboInterceptor(SqlServer.SA.MS).sql new file mode 100644 index 00000000000..550d60442c5 --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/InterceptorTests/LinqToDB.EntityFrameworkCore.Tests.InterceptorTests.TestEfCoreSideOfComboInterceptor(SqlServer.SA.MS).sql @@ -0,0 +1,9 @@ +Parameters: +@__p_0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT TOP(@__p_0) [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductID] > 0 +ORDER BY [p].[ProductID] + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue117Test(SqlServer.SA.MS).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue117Test(SqlServer.SA.MS).sql new file mode 100644 index 00000000000..1e0723a91d2 --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue117Test(SqlServer.SA.MS).sql @@ -0,0 +1,9 @@ +Parameters: +@__userId_1='?' (DbType = Int32), @__userId_0='?' (DbType = Int32) + +SELECT [p].[Id] AS [PatentId], @__userId_1 AS [UserId] +FROM [Patents] AS [p] +LEFT JOIN [PatentAssessment] AS [p0] ON [p].[Id] = [p0].[PatentId] +WHERE [p0].[PatentId] IS NULL OR [p0].[TechnicalReviewerId] <> @__userId_0 OR [p0].[TechnicalReviewerId] IS NULL + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue73Test(SqlServer.SA.MS).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue73Test(SqlServer.SA.MS).sql new file mode 100644 index 00000000000..6a6908a5aa9 --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/IssueTests/LinqToDB.EntityFrameworkCore.Tests.IssueTests.Issue73Test(SqlServer.SA.MS).sql @@ -0,0 +1,6 @@ +SELECT COALESCE([i0].[Name], N'') + N'>' + [i].[Name] +FROM [Issue73Entities] AS [i] +LEFT JOIN [Issue73Entities] AS [i0] ON [i].[ParentId] = [i0].[Id] +WHERE [i].[Name] = N'Name1_3' + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated(SqlServer.SA.MS).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated(SqlServer.SA.MS).sql new file mode 100644 index 00000000000..761b1ced8fe --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated(SqlServer.SA.MS).sql @@ -0,0 +1,10 @@ +Parameters: +p0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [l].[CategoryID], [l].[CategoryName], [l].[Description], [l].[IsDeleted], [l].[Picture] +FROM ( + SELECT * FROM [dbo].[Categories] WHERE CategoryId = @p0 +) AS [l] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated2(SqlServer.SA.MS).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated2(SqlServer.SA.MS).sql new file mode 100644 index 00000000000..4e7025136cc --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlInterpolated2(SqlServer.SA.MS).sql @@ -0,0 +1,15 @@ +Parameters: +p0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [l0].[CategoryID], [l0].[CategoryName], [l0].[Description], [l0].[IsDeleted], [l0].[Picture] +FROM [Categories] AS [c] +CROSS JOIN ( + SELECT [l].[CategoryID], [l].[CategoryName], [l].[Description], [l].[IsDeleted], [l].[Picture] + FROM ( + SELECT * FROM [dbo].[Categories] WHERE CategoryId = @p0 + ) AS [l] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) +) AS [l0] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw(SqlServer.SA.MS).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw(SqlServer.SA.MS).sql new file mode 100644 index 00000000000..761b1ced8fe --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw(SqlServer.SA.MS).sql @@ -0,0 +1,10 @@ +Parameters: +p0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [l].[CategoryID], [l].[CategoryName], [l].[Description], [l].[IsDeleted], [l].[Picture] +FROM ( + SELECT * FROM [dbo].[Categories] WHERE CategoryId = @p0 +) AS [l] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw2(SqlServer.SA.MS).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw2(SqlServer.SA.MS).sql new file mode 100644 index 00000000000..4e7025136cc --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.FromSqlRaw2(SqlServer.SA.MS).sql @@ -0,0 +1,15 @@ +Parameters: +p0='?' (DbType = Int32), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [l0].[CategoryID], [l0].[CategoryName], [l0].[Description], [l0].[IsDeleted], [l0].[Picture] +FROM [Categories] AS [c] +CROSS JOIN ( + SELECT [l].[CategoryID], [l].[CategoryName], [l].[Description], [l].[IsDeleted], [l].[Picture] + FROM ( + SELECT * FROM [dbo].[Categories] WHERE CategoryId = @p0 + ) AS [l] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) OR [l].[IsDeleted] = CAST(0 AS bit) +) AS [l0] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.NavigationProperties(SqlServer.SA.MS).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.NavigationProperties(SqlServer.SA.MS).sql new file mode 100644 index 00000000000..4787fb868ab --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.NavigationProperties(SqlServer.SA.MS).sql @@ -0,0 +1,24 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o1].[OrderID], [o1].[ProductID], [p0].[ProductID], [o3].[OrderId], [o3].[ProductId], [o3].[Quantity], [o1].[Quantity], [p0].[ProductName] +FROM [Orders] AS [o] +INNER JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Quantity] + FROM [Order Details] AS [o0] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [o1] ON [o].[OrderID] = [o1].[OrderID] +INNER JOIN ( + SELECT [p].[ProductID], [p].[ProductName] + FROM [Products] AS [p] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) +) AS [p0] ON [o1].[ProductID] = [p0].[ProductID] +LEFT JOIN ( + SELECT [o2].[OrderID] AS [OrderId], [o2].[ProductID] AS [ProductId], [o2].[Quantity] + FROM [Order Details] AS [o2] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o2].[IsDeleted] = CAST(0 AS bit) OR [o2].[IsDeleted] = CAST(0 AS bit) +) AS [o3] ON [p0].[ProductID] = [o3].[ProductId] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [o1].[OrderID], [o1].[ProductID], [p0].[ProductID], [o3].[OrderId] + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.SA.MS,False).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.SA.MS,False).sql new file mode 100644 index 00000000000..d971cbfab3d --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.SA.MS,False).sql @@ -0,0 +1,28 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%' + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%' + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT CASE + WHEN EXISTS ( + SELECT 1 + FROM [Products] AS [p] + WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%') THEN CAST(1 AS bit) + ELSE CAST(0 AS bit) +END + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.SA.MS,True).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.SA.MS,True).sql new file mode 100644 index 00000000000..d971cbfab3d --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestAsyncMethods(SqlServer.SA.MS,True).sql @@ -0,0 +1,28 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%' + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%' + + +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT CASE + WHEN EXISTS ( + SELECT 1 + FROM [Products] AS [p] + WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'%a%') THEN CAST(1 AS bit) + ELSE CAST(0 AS bit) +END + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.SA.MS,False).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.SA.MS,False).sql new file mode 100644 index 00000000000..5c143463885 --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.SA.MS,False).sql @@ -0,0 +1,10 @@ +Parameters: +@p1='?' (DbType = Int32), @p2='?' (DbType = Int32), @p0='?' (DbType = Currency) + +SET IMPLICIT_TRANSACTIONS OFF; +SET NOCOUNT ON; +UPDATE [Order Details] SET [UnitPrice] = @p0 +OUTPUT 1 +WHERE [OrderID] = @p1 AND [ProductID] = @p2; + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.SA.MS,True).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.SA.MS,True).sql new file mode 100644 index 00000000000..5c143463885 --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestChangeTracker(SqlServer.SA.MS,True).sql @@ -0,0 +1,10 @@ +Parameters: +@p1='?' (DbType = Int32), @p2='?' (DbType = Int32), @p0='?' (DbType = Currency) + +SET IMPLICIT_TRANSACTIONS OFF; +SET NOCOUNT ON; +UPDATE [Order Details] SET [UnitPrice] = @p0 +OUTPUT 1 +WHERE [OrderID] = @p1 AND [ProductID] = @p2; + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestCommandTimeout(SqlServer.SA.MS).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestCommandTimeout(SqlServer.SA.MS).sql new file mode 100644 index 00000000000..54eea14853c --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestCommandTimeout(SqlServer.SA.MS).sql @@ -0,0 +1,19 @@ +CREATE OR ALTER FUNCTION dbo.[ProcessLong] + ( + @secondsNumber int + ) + RETURNS int + AS + BEGIN + declare @startTime datetime = getutcdate() + while datediff(second, @startTime, getutcdate()) < @secondsNumber + begin + set @startTime = @startTime + end + return 1 + END + + +DROP FUNCTION IF EXISTS [dbo].[ProcessLong] + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.SA.MS,False).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.SA.MS,False).sql new file mode 100644 index 00000000000..26064712104 --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.SA.MS,False).sql @@ -0,0 +1,24 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [s].[OrderID], [s].[ProductID], [s].[Discount], [s].[IsDeleted], [s].[Quantity], [s].[UnitPrice], [s].[ProductID0], [s].[CategoryID], [s].[Discontinued], [s].[IsDeleted0], [s].[PeriodEnd], [s].[PeriodStart], [s].[ProductName], [s].[QuantityPerUnit], [s].[ReorderLevel], [s].[SupplierID], [s].[UnitPrice0], [s].[UnitsInStock], [s].[UnitsOnOrder], [s].[OrderID0], [s].[ProductID1], [s].[Discount0], [s].[IsDeleted1], [s].[Quantity0], [s].[UnitPrice1] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder], [o2].[OrderID] AS [OrderID0], [o2].[ProductID] AS [ProductID1], [o2].[Discount] AS [Discount0], [o2].[IsDeleted] AS [IsDeleted1], [o2].[Quantity] AS [Quantity0], [o2].[UnitPrice] AS [UnitPrice1] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + LEFT JOIN ( + SELECT [o1].[OrderID], [o1].[ProductID], [o1].[Discount], [o1].[IsDeleted], [o1].[Quantity], [o1].[UnitPrice] + FROM [Order Details] AS [o1] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o1].[IsDeleted] = CAST(0 AS bit) OR [o1].[IsDeleted] = CAST(0 AS bit) + ) AS [o2] ON [p0].[ProductID] = [o2].[ProductID] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [o].[OrderID] = [s].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [s].[OrderID], [s].[ProductID], [s].[ProductID0], [s].[OrderID0] + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.SA.MS,True).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.SA.MS,True).sql new file mode 100644 index 00000000000..26064712104 --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestContinuousQueries(SqlServer.SA.MS,True).sql @@ -0,0 +1,24 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [s].[OrderID], [s].[ProductID], [s].[Discount], [s].[IsDeleted], [s].[Quantity], [s].[UnitPrice], [s].[ProductID0], [s].[CategoryID], [s].[Discontinued], [s].[IsDeleted0], [s].[PeriodEnd], [s].[PeriodStart], [s].[ProductName], [s].[QuantityPerUnit], [s].[ReorderLevel], [s].[SupplierID], [s].[UnitPrice0], [s].[UnitsInStock], [s].[UnitsOnOrder], [s].[OrderID0], [s].[ProductID1], [s].[Discount0], [s].[IsDeleted1], [s].[Quantity0], [s].[UnitPrice1] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder], [o2].[OrderID] AS [OrderID0], [o2].[ProductID] AS [ProductID1], [o2].[Discount] AS [Discount0], [o2].[IsDeleted] AS [IsDeleted1], [o2].[Quantity] AS [Quantity0], [o2].[UnitPrice] AS [UnitPrice1] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + LEFT JOIN ( + SELECT [o1].[OrderID], [o1].[ProductID], [o1].[Discount], [o1].[IsDeleted], [o1].[Quantity], [o1].[UnitPrice] + FROM [Order Details] AS [o1] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o1].[IsDeleted] = CAST(0 AS bit) OR [o1].[IsDeleted] = CAST(0 AS bit) + ) AS [o2] ON [p0].[ProductID] = [o2].[ProductID] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [o].[OrderID] = [s].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [s].[OrderID], [s].[ProductID], [s].[ProductID0], [s].[OrderID0] + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.SA.MS,False).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.SA.MS,False).sql new file mode 100644 index 00000000000..ea7933460c5 --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.SA.MS,False).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [o].[OrderID], [s].[EmployeeID], [s].[TerritoryID], [s].[IsDeleted], [s].[TerritoryID0], [s].[IsDeleted0], [s].[RegionID], [s].[TerritoryDescription], [s0].[OrderID], [s0].[ProductID], [s0].[Discount], [s0].[IsDeleted], [s0].[Quantity], [s0].[UnitPrice], [s0].[ProductID0], [s0].[CategoryID], [s0].[Discontinued], [s0].[IsDeleted0], [s0].[PeriodEnd], [s0].[PeriodStart], [s0].[ProductName], [s0].[QuantityPerUnit], [s0].[ReorderLevel], [s0].[SupplierID], [s0].[UnitPrice0], [s0].[UnitsInStock], [s0].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted], [t0].[TerritoryID] AS [TerritoryID0], [t0].[IsDeleted] AS [IsDeleted0], [t0].[RegionID], [t0].[TerritoryDescription] + FROM [EmployeeTerritories] AS [e1] + INNER JOIN ( + SELECT [t].[TerritoryID], [t].[IsDeleted], [t].[RegionID], [t].[TerritoryDescription] + FROM [Territories] AS [t] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) + ) AS [t0] ON [e1].[TerritoryID] = [t0].[TerritoryID] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [e0].[EmployeeID] = [s].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_5 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s0] ON [o].[OrderID] = [s0].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [s].[EmployeeID], [s].[TerritoryID], [s].[TerritoryID0], [s0].[OrderID], [s0].[ProductID] + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.SA.MS,True).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.SA.MS,True).sql new file mode 100644 index 00000000000..ea7933460c5 --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestEager(SqlServer.SA.MS,True).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [o].[OrderID], [s].[EmployeeID], [s].[TerritoryID], [s].[IsDeleted], [s].[TerritoryID0], [s].[IsDeleted0], [s].[RegionID], [s].[TerritoryDescription], [s0].[OrderID], [s0].[ProductID], [s0].[Discount], [s0].[IsDeleted], [s0].[Quantity], [s0].[UnitPrice], [s0].[ProductID0], [s0].[CategoryID], [s0].[Discontinued], [s0].[IsDeleted0], [s0].[PeriodEnd], [s0].[PeriodStart], [s0].[ProductName], [s0].[QuantityPerUnit], [s0].[ReorderLevel], [s0].[SupplierID], [s0].[UnitPrice0], [s0].[UnitsInStock], [s0].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted], [t0].[TerritoryID] AS [TerritoryID0], [t0].[IsDeleted] AS [IsDeleted0], [t0].[RegionID], [t0].[TerritoryDescription] + FROM [EmployeeTerritories] AS [e1] + INNER JOIN ( + SELECT [t].[TerritoryID], [t].[IsDeleted], [t].[RegionID], [t].[TerritoryDescription] + FROM [Territories] AS [t] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) + ) AS [t0] ON [e1].[TerritoryID] = [t0].[TerritoryID] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [e0].[EmployeeID] = [s].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_5 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s0] ON [o].[OrderID] = [s0].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [s].[EmployeeID], [s].[TerritoryID], [s].[TerritoryID0], [s0].[OrderID], [s0].[ProductID] + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.SA.MS,False).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.SA.MS,False).sql new file mode 100644 index 00000000000..1b9ca7c0743 --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.SA.MS,False).sql @@ -0,0 +1,13 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy], [e1].[EmployeeID], [e1].[Address], [e1].[BirthDate], [e1].[City], [e1].[Country], [e1].[Extension], [e1].[FirstName], [e1].[HireDate], [e1].[HomePhone], [e1].[IsDeleted], [e1].[LastName], [e1].[Notes], [e1].[Photo], [e1].[PhotoPath], [e1].[PostalCode], [e1].[Region], [e1].[ReportsTo], [e1].[Title], [e1].[TitleOfCourtesy] +FROM [Employees] AS [e] +LEFT JOIN ( + SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy] + FROM [Employees] AS [e0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) +) AS [e1] ON [e].[ReportsTo] = [e1].[EmployeeID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.SA.MS,True).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.SA.MS,True).sql new file mode 100644 index 00000000000..1b9ca7c0743 --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestForeignKey(SqlServer.SA.MS,True).sql @@ -0,0 +1,13 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy], [e1].[EmployeeID], [e1].[Address], [e1].[BirthDate], [e1].[City], [e1].[Country], [e1].[Extension], [e1].[FirstName], [e1].[HireDate], [e1].[HomePhone], [e1].[IsDeleted], [e1].[LastName], [e1].[Notes], [e1].[Photo], [e1].[PhotoPath], [e1].[PostalCode], [e1].[Region], [e1].[ReportsTo], [e1].[Title], [e1].[TitleOfCourtesy] +FROM [Employees] AS [e] +LEFT JOIN ( + SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy] + FROM [Employees] AS [e0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) +) AS [e1] ON [e].[ReportsTo] = [e1].[EmployeeID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.SA.MS,False).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.SA.MS,False).sql new file mode 100644 index 00000000000..3180e5e2124 --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.SA.MS,False).sql @@ -0,0 +1,18 @@ +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[IsDeleted], [o].[Quantity], [o].[UnitPrice] +FROM [Products] AS [p] +INNER JOIN [Order Details] AS [o] ON [p].[ProductID] = [o].[ProductID] + + +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice] +FROM [Products] AS [p] +INNER JOIN ( + SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[IsDeleted], [o].[Quantity], [o].[UnitPrice] + FROM [Order Details] AS [o] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +) AS [o0] ON [p].[ProductID] = [o0].[ProductID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.SA.MS,True).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.SA.MS,True).sql new file mode 100644 index 00000000000..3180e5e2124 --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestGlobalQueryFilters(SqlServer.SA.MS,True).sql @@ -0,0 +1,18 @@ +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[IsDeleted], [o].[Quantity], [o].[UnitPrice] +FROM [Products] AS [p] +INNER JOIN [Order Details] AS [o] ON [p].[ProductID] = [o].[ProductID] + + +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice] +FROM [Products] AS [p] +INNER JOIN ( + SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[IsDeleted], [o].[Quantity], [o].[UnitPrice] + FROM [Order Details] AS [o] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +) AS [o0] ON [p].[ProductID] = [o0].[ProductID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.SA.MS,False).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.SA.MS,False).sql new file mode 100644 index 00000000000..d17a1454daa --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.SA.MS,False).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [s].[EmployeeID], [s].[TerritoryID], [s].[IsDeleted], [s].[TerritoryID0], [s].[IsDeleted0], [s].[RegionID], [s].[TerritoryDescription], [s0].[OrderID], [s0].[ProductID], [s0].[Discount], [s0].[IsDeleted], [s0].[Quantity], [s0].[UnitPrice], [s0].[ProductID0], [s0].[CategoryID], [s0].[Discontinued], [s0].[IsDeleted0], [s0].[PeriodEnd], [s0].[PeriodStart], [s0].[ProductName], [s0].[QuantityPerUnit], [s0].[ReorderLevel], [s0].[SupplierID], [s0].[UnitPrice0], [s0].[UnitsInStock], [s0].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted], [t0].[TerritoryID] AS [TerritoryID0], [t0].[IsDeleted] AS [IsDeleted0], [t0].[RegionID], [t0].[TerritoryDescription] + FROM [EmployeeTerritories] AS [e1] + INNER JOIN ( + SELECT [t].[TerritoryID], [t].[IsDeleted], [t].[RegionID], [t].[TerritoryDescription] + FROM [Territories] AS [t] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) + ) AS [t0] ON [e1].[TerritoryID] = [t0].[TerritoryID] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [e0].[EmployeeID] = [s].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_5 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s0] ON [o].[OrderID] = [s0].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [s].[EmployeeID], [s].[TerritoryID], [s].[TerritoryID0], [s0].[OrderID], [s0].[ProductID] + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.SA.MS,True).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.SA.MS,True).sql new file mode 100644 index 00000000000..d17a1454daa --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestInclude(SqlServer.SA.MS,True).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_5='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [s].[EmployeeID], [s].[TerritoryID], [s].[IsDeleted], [s].[TerritoryID0], [s].[IsDeleted0], [s].[RegionID], [s].[TerritoryDescription], [s0].[OrderID], [s0].[ProductID], [s0].[Discount], [s0].[IsDeleted], [s0].[Quantity], [s0].[UnitPrice], [s0].[ProductID0], [s0].[CategoryID], [s0].[Discontinued], [s0].[IsDeleted0], [s0].[PeriodEnd], [s0].[PeriodStart], [s0].[ProductName], [s0].[QuantityPerUnit], [s0].[ReorderLevel], [s0].[SupplierID], [s0].[UnitPrice0], [s0].[UnitsInStock], [s0].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted], [t0].[TerritoryID] AS [TerritoryID0], [t0].[IsDeleted] AS [IsDeleted0], [t0].[RegionID], [t0].[TerritoryDescription] + FROM [EmployeeTerritories] AS [e1] + INNER JOIN ( + SELECT [t].[TerritoryID], [t].[IsDeleted], [t].[RegionID], [t].[TerritoryDescription] + FROM [Territories] AS [t] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) OR [t].[IsDeleted] = CAST(0 AS bit) + ) AS [t0] ON [e1].[TerritoryID] = [t0].[TerritoryID] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [e0].[EmployeeID] = [s].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_5 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s0] ON [o].[OrderID] = [s0].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [s].[EmployeeID], [s].[TerritoryID], [s].[TerritoryID0], [s0].[OrderID], [s0].[ProductID] + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.SA.MS,False).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.SA.MS,False).sql new file mode 100644 index 00000000000..def257d2102 --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.SA.MS,False).sql @@ -0,0 +1,29 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [e2].[EmployeeID], [e2].[TerritoryID], [e2].[IsDeleted], [s].[OrderID], [s].[ProductID], [s].[Discount], [s].[IsDeleted], [s].[Quantity], [s].[UnitPrice], [s].[ProductID0], [s].[CategoryID], [s].[Discontinued], [s].[IsDeleted0], [s].[PeriodEnd], [s].[PeriodStart], [s].[ProductName], [s].[QuantityPerUnit], [s].[ReorderLevel], [s].[SupplierID], [s].[UnitPrice0], [s].[UnitsInStock], [s].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted] + FROM [EmployeeTerritories] AS [e1] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [e2] ON [e0].[EmployeeID] = [e2].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [o].[OrderID] = [s].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [e2].[EmployeeID], [e2].[TerritoryID], [s].[OrderID], [s].[ProductID] + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.SA.MS,True).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.SA.MS,True).sql new file mode 100644 index 00000000000..def257d2102 --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestIncludeString(SqlServer.SA.MS,True).sql @@ -0,0 +1,29 @@ +Parameters: +@__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_4='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[IsDeleted], [o].[OrderDate], [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate], [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy], [e2].[EmployeeID], [e2].[TerritoryID], [e2].[IsDeleted], [s].[OrderID], [s].[ProductID], [s].[Discount], [s].[IsDeleted], [s].[Quantity], [s].[UnitPrice], [s].[ProductID0], [s].[CategoryID], [s].[Discontinued], [s].[IsDeleted0], [s].[PeriodEnd], [s].[PeriodStart], [s].[ProductName], [s].[QuantityPerUnit], [s].[ReorderLevel], [s].[SupplierID], [s].[UnitPrice0], [s].[UnitsInStock], [s].[UnitsOnOrder] +FROM [Orders] AS [o] +LEFT JOIN ( + SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] + FROM [Employees] AS [e] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) +) AS [e0] ON [o].[EmployeeID] = [e0].[EmployeeID] +LEFT JOIN ( + SELECT [e1].[EmployeeID], [e1].[TerritoryID], [e1].[IsDeleted] + FROM [EmployeeTerritories] AS [e1] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) OR [e1].[IsDeleted] = CAST(0 AS bit) +) AS [e2] ON [e0].[EmployeeID] = [e2].[EmployeeID] +LEFT JOIN ( + SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[IsDeleted], [o0].[Quantity], [o0].[UnitPrice], [p0].[ProductID] AS [ProductID0], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted] AS [IsDeleted0], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice] AS [UnitPrice0], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Order Details] AS [o0] + INNER JOIN ( + SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder] + FROM [Products] AS [p] + WHERE @__ef_filter__p_4 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + ) AS [p0] ON [o0].[ProductID] = [p0].[ProductID] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) +) AS [s] ON [o].[OrderID] = [s].[OrderID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +ORDER BY [o].[OrderID], [e0].[EmployeeID], [e2].[EmployeeID], [e2].[TerritoryID], [s].[OrderID], [s].[ProductID] + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.SA.MS,False).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.SA.MS,False).sql new file mode 100644 index 00000000000..76f07dd62df --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.SA.MS,False).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT [p].[ProductName], [p].[ProductID], [s1].[Discount], [s1].[OrderID], [s1].[CustomerID], [s1].[EmployeeID], [s1].[Freight], [s1].[IsDeleted], [s1].[OrderDate], [s1].[RequiredDate], [s1].[ShipAddress], [s1].[ShipCity], [s1].[ShipCountry], [s1].[ShipName], [s1].[ShipPostalCode], [s1].[ShipRegion], [s1].[ShipVia], [s1].[ShippedDate], [s1].[OrderID0], [s1].[ProductID], [s1].[ProductID0], [s1].[SupplierID], [s1].[ProductID1], [s1].[CategoryID], [s1].[Discontinued], [s1].[IsDeleted0], [s1].[PeriodEnd], [s1].[PeriodStart], [s1].[ProductName], [s1].[QuantityPerUnit], [s1].[ReorderLevel], [s1].[SupplierID0], [s1].[UnitPrice], [s1].[UnitsInStock], [s1].[UnitsOnOrder] +FROM [Products] AS [p] +LEFT JOIN ( + SELECT [o].[Discount], [o1].[OrderID], [o1].[CustomerID], [o1].[EmployeeID], [o1].[Freight], [o1].[IsDeleted], [o1].[OrderDate], [o1].[RequiredDate], [o1].[ShipAddress], [o1].[ShipCity], [o1].[ShipCountry], [o1].[ShipName], [o1].[ShipPostalCode], [o1].[ShipRegion], [o1].[ShipVia], [o1].[ShippedDate], [o].[OrderID] AS [OrderID0], [o].[ProductID], [p1].[ProductID] AS [ProductID0], [s0].[SupplierID], [p3].[ProductID] AS [ProductID1], [p3].[CategoryID], [p3].[Discontinued], [p3].[IsDeleted] AS [IsDeleted0], [p3].[PeriodEnd], [p3].[PeriodStart], [p3].[ProductName], [p3].[QuantityPerUnit], [p3].[ReorderLevel], [p3].[SupplierID] AS [SupplierID0], [p3].[UnitPrice], [p3].[UnitsInStock], [p3].[UnitsOnOrder] + FROM [Order Details] AS [o] + INNER JOIN ( + SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[Freight], [o0].[IsDeleted], [o0].[OrderDate], [o0].[RequiredDate], [o0].[ShipAddress], [o0].[ShipCity], [o0].[ShipCountry], [o0].[ShipName], [o0].[ShipPostalCode], [o0].[ShipRegion], [o0].[ShipVia], [o0].[ShippedDate] + FROM [Orders] AS [o0] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) + ) AS [o1] ON [o].[OrderID] = [o1].[OrderID] + INNER JOIN ( + SELECT [p0].[ProductID], [p0].[SupplierID] + FROM [Products] AS [p0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) + ) AS [p1] ON [o].[ProductID] = [p1].[ProductID] + LEFT JOIN ( + SELECT [s].[SupplierID] + FROM [Suppliers] AS [s] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [s].[IsDeleted] = CAST(0 AS bit) OR [s].[IsDeleted] = CAST(0 AS bit) + ) AS [s0] ON [p1].[SupplierID] = [s0].[SupplierID] + LEFT JOIN ( + SELECT [p2].[ProductID], [p2].[CategoryID], [p2].[Discontinued], [p2].[IsDeleted], [p2].[PeriodEnd], [p2].[PeriodStart], [p2].[ProductName], [p2].[QuantityPerUnit], [p2].[ReorderLevel], [p2].[SupplierID], [p2].[UnitPrice], [p2].[UnitsInStock], [p2].[UnitsOnOrder] + FROM [Products] AS [p2] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p2].[IsDeleted] = CAST(0 AS bit) OR [p2].[IsDeleted] = CAST(0 AS bit) + ) AS [p3] ON [s0].[SupplierID] = [p3].[SupplierID] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +) AS [s1] ON [p].[ProductID] = [s1].[ProductID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) +ORDER BY [p].[ProductID], [s1].[OrderID0], [s1].[ProductID], [s1].[OrderID], [s1].[ProductID0], [s1].[SupplierID] + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.SA.MS,True).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.SA.MS,True).sql new file mode 100644 index 00000000000..76f07dd62df --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestLoadFilter(SqlServer.SA.MS,True).sql @@ -0,0 +1,34 @@ +Parameters: +@__ef_filter__p_2='?' (DbType = Boolean), @__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_3='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT [p].[ProductName], [p].[ProductID], [s1].[Discount], [s1].[OrderID], [s1].[CustomerID], [s1].[EmployeeID], [s1].[Freight], [s1].[IsDeleted], [s1].[OrderDate], [s1].[RequiredDate], [s1].[ShipAddress], [s1].[ShipCity], [s1].[ShipCountry], [s1].[ShipName], [s1].[ShipPostalCode], [s1].[ShipRegion], [s1].[ShipVia], [s1].[ShippedDate], [s1].[OrderID0], [s1].[ProductID], [s1].[ProductID0], [s1].[SupplierID], [s1].[ProductID1], [s1].[CategoryID], [s1].[Discontinued], [s1].[IsDeleted0], [s1].[PeriodEnd], [s1].[PeriodStart], [s1].[ProductName], [s1].[QuantityPerUnit], [s1].[ReorderLevel], [s1].[SupplierID0], [s1].[UnitPrice], [s1].[UnitsInStock], [s1].[UnitsOnOrder] +FROM [Products] AS [p] +LEFT JOIN ( + SELECT [o].[Discount], [o1].[OrderID], [o1].[CustomerID], [o1].[EmployeeID], [o1].[Freight], [o1].[IsDeleted], [o1].[OrderDate], [o1].[RequiredDate], [o1].[ShipAddress], [o1].[ShipCity], [o1].[ShipCountry], [o1].[ShipName], [o1].[ShipPostalCode], [o1].[ShipRegion], [o1].[ShipVia], [o1].[ShippedDate], [o].[OrderID] AS [OrderID0], [o].[ProductID], [p1].[ProductID] AS [ProductID0], [s0].[SupplierID], [p3].[ProductID] AS [ProductID1], [p3].[CategoryID], [p3].[Discontinued], [p3].[IsDeleted] AS [IsDeleted0], [p3].[PeriodEnd], [p3].[PeriodStart], [p3].[ProductName], [p3].[QuantityPerUnit], [p3].[ReorderLevel], [p3].[SupplierID] AS [SupplierID0], [p3].[UnitPrice], [p3].[UnitsInStock], [p3].[UnitsOnOrder] + FROM [Order Details] AS [o] + INNER JOIN ( + SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[Freight], [o0].[IsDeleted], [o0].[OrderDate], [o0].[RequiredDate], [o0].[ShipAddress], [o0].[ShipCity], [o0].[ShipCountry], [o0].[ShipName], [o0].[ShipPostalCode], [o0].[ShipRegion], [o0].[ShipVia], [o0].[ShippedDate] + FROM [Orders] AS [o0] + WHERE @__ef_filter__p_2 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) + ) AS [o1] ON [o].[OrderID] = [o1].[OrderID] + INNER JOIN ( + SELECT [p0].[ProductID], [p0].[SupplierID] + FROM [Products] AS [p0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) + ) AS [p1] ON [o].[ProductID] = [p1].[ProductID] + LEFT JOIN ( + SELECT [s].[SupplierID] + FROM [Suppliers] AS [s] + WHERE @__ef_filter__p_3 = CAST(1 AS bit) OR [s].[IsDeleted] = CAST(0 AS bit) OR [s].[IsDeleted] = CAST(0 AS bit) + ) AS [s0] ON [p1].[SupplierID] = [s0].[SupplierID] + LEFT JOIN ( + SELECT [p2].[ProductID], [p2].[CategoryID], [p2].[Discontinued], [p2].[IsDeleted], [p2].[PeriodEnd], [p2].[PeriodStart], [p2].[ProductName], [p2].[QuantityPerUnit], [p2].[ReorderLevel], [p2].[SupplierID], [p2].[UnitPrice], [p2].[UnitsInStock], [p2].[UnitsOnOrder] + FROM [Products] AS [p2] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p2].[IsDeleted] = CAST(0 AS bit) OR [p2].[IsDeleted] = CAST(0 AS bit) + ) AS [p3] ON [s0].[SupplierID] = [p3].[SupplierID] + WHERE @__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) +) AS [s1] ON [p].[ProductID] = [s1].[ProductID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) +ORDER BY [p].[ProductID], [s1].[OrderID0], [s1].[ProductID], [s1].[OrderID], [s1].[ProductID0], [s1].[SupplierID] + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.SA.MS,False).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.SA.MS,False).sql new file mode 100644 index 00000000000..5e8fe75715c --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.SA.MS,False).sql @@ -0,0 +1,20 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [p1].[ProductID], [p1].[CategoryID], [p1].[Discontinued], [p1].[IsDeleted], [p1].[PeriodEnd], [p1].[PeriodStart], [p1].[ProductName], [p1].[QuantityPerUnit], [p1].[ReorderLevel], [p1].[SupplierID], [p1].[UnitPrice], [p1].[UnitsInStock], [p1].[UnitsOnOrder] +FROM [Products] AS [p] +CROSS JOIN ( + SELECT [p0].[ProductID], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Products] AS [p0] + WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit)) AND ( + SELECT COUNT(*) + FROM [Order Details] AS [o0] + WHERE (@__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit)) AND [p0].[ProductID] = [o0].[ProductID]) > 0 +) AS [p1] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND ( + SELECT COUNT(*) + FROM [Order Details] AS [o] + WHERE (@__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductID] = [o].[ProductID]) > 0 AND [p].[ProductID] = [p1].[ProductID] +ORDER BY [p].[ProductID] + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.SA.MS,True).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.SA.MS,True).sql new file mode 100644 index 00000000000..5e8fe75715c --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNestingFunctions(SqlServer.SA.MS,True).sql @@ -0,0 +1,20 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean) + +SELECT [p].[ProductID], [p].[CategoryID], [p].[Discontinued], [p].[IsDeleted], [p].[PeriodEnd], [p].[PeriodStart], [p].[ProductName], [p].[QuantityPerUnit], [p].[ReorderLevel], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock], [p].[UnitsOnOrder], [p1].[ProductID], [p1].[CategoryID], [p1].[Discontinued], [p1].[IsDeleted], [p1].[PeriodEnd], [p1].[PeriodStart], [p1].[ProductName], [p1].[QuantityPerUnit], [p1].[ReorderLevel], [p1].[SupplierID], [p1].[UnitPrice], [p1].[UnitsInStock], [p1].[UnitsOnOrder] +FROM [Products] AS [p] +CROSS JOIN ( + SELECT [p0].[ProductID], [p0].[CategoryID], [p0].[Discontinued], [p0].[IsDeleted], [p0].[PeriodEnd], [p0].[PeriodStart], [p0].[ProductName], [p0].[QuantityPerUnit], [p0].[ReorderLevel], [p0].[SupplierID], [p0].[UnitPrice], [p0].[UnitsInStock], [p0].[UnitsOnOrder] + FROM [Products] AS [p0] + WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit) OR [p0].[IsDeleted] = CAST(0 AS bit)) AND ( + SELECT COUNT(*) + FROM [Order Details] AS [o0] + WHERE (@__ef_filter__p_1 = CAST(1 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit) OR [o0].[IsDeleted] = CAST(0 AS bit)) AND [p0].[ProductID] = [o0].[ProductID]) > 0 +) AS [p1] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND ( + SELECT COUNT(*) + FROM [Order Details] AS [o] + WHERE (@__ef_filter__p_1 = CAST(1 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit) OR [o].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductID] = [o].[ProductID]) > 0 AND [p].[ProductID] = [p1].[ProductID] +ORDER BY [p].[ProductID] + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.SA.MS,False).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.SA.MS,False).sql new file mode 100644 index 00000000000..03ff17e1f17 --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.SA.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__test_0='?' (DbType = Int32) + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] +FROM [Employees] AS [e] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit)) AND [e].[EmployeeID] = @__test_0 + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.SA.MS,True).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.SA.MS,True).sql new file mode 100644 index 00000000000..03ff17e1f17 --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestNullability(SqlServer.SA.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean), @__test_0='?' (DbType = Int32) + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy] +FROM [Employees] AS [e] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit)) AND [e].[EmployeeID] = @__test_0 + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.SA.MS,False).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.SA.MS,False).sql new file mode 100644 index 00000000000..e047dc4281d --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.SA.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT TOP(1) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[IsDeleted], [c].[Phone], [c].[PostalCode], [c].[Region] +FROM [Customers] AS [c] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.SA.MS,True).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.SA.MS,True).sql new file mode 100644 index 00000000000..e047dc4281d --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestSetUpdate(SqlServer.SA.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT TOP(1) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[IsDeleted], [c].[Phone], [c].[PostalCode], [c].[Region] +FROM [Customers] AS [c] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) OR [c].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.SA.MS,False).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.SA.MS,False).sql new file mode 100644 index 00000000000..1d6793b0b8c --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.SA.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[QuantityPerUnit] AS [Quantity] +FROM [Products] AS [p] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.SA.MS,True).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.SA.MS,True).sql new file mode 100644 index 00000000000..1d6793b0b8c --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestShadowProperty(SqlServer.SA.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT [p].[QuantityPerUnit] AS [Quantity] +FROM [Products] AS [p] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.SA.MS,False).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.SA.MS,False).sql new file mode 100644 index 00000000000..5853efae690 --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.SA.MS,False).sql @@ -0,0 +1,15 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +-- Tagged query + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy], [e1].[EmployeeID], [e1].[Address], [e1].[BirthDate], [e1].[City], [e1].[Country], [e1].[Extension], [e1].[FirstName], [e1].[HireDate], [e1].[HomePhone], [e1].[IsDeleted], [e1].[LastName], [e1].[Notes], [e1].[Photo], [e1].[PhotoPath], [e1].[PostalCode], [e1].[Region], [e1].[ReportsTo], [e1].[Title], [e1].[TitleOfCourtesy] +FROM [Employees] AS [e] +LEFT JOIN ( + SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy] + FROM [Employees] AS [e0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) +) AS [e1] ON [e].[ReportsTo] = [e1].[EmployeeID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.SA.MS,True).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.SA.MS,True).sql new file mode 100644 index 00000000000..5853efae690 --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTagWith(SqlServer.SA.MS,True).sql @@ -0,0 +1,15 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +-- Tagged query + +SELECT [e].[EmployeeID], [e].[Address], [e].[BirthDate], [e].[City], [e].[Country], [e].[Extension], [e].[FirstName], [e].[HireDate], [e].[HomePhone], [e].[IsDeleted], [e].[LastName], [e].[Notes], [e].[Photo], [e].[PhotoPath], [e].[PostalCode], [e].[Region], [e].[ReportsTo], [e].[Title], [e].[TitleOfCourtesy], [e1].[EmployeeID], [e1].[Address], [e1].[BirthDate], [e1].[City], [e1].[Country], [e1].[Extension], [e1].[FirstName], [e1].[HireDate], [e1].[HomePhone], [e1].[IsDeleted], [e1].[LastName], [e1].[Notes], [e1].[Photo], [e1].[PhotoPath], [e1].[PostalCode], [e1].[Region], [e1].[ReportsTo], [e1].[Title], [e1].[TitleOfCourtesy] +FROM [Employees] AS [e] +LEFT JOIN ( + SELECT [e0].[EmployeeID], [e0].[Address], [e0].[BirthDate], [e0].[City], [e0].[Country], [e0].[Extension], [e0].[FirstName], [e0].[HireDate], [e0].[HomePhone], [e0].[IsDeleted], [e0].[LastName], [e0].[Notes], [e0].[Photo], [e0].[PhotoPath], [e0].[PostalCode], [e0].[Region], [e0].[ReportsTo], [e0].[Title], [e0].[TitleOfCourtesy] + FROM [Employees] AS [e0] + WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) OR [e0].[IsDeleted] = CAST(0 AS bit) +) AS [e1] ON [e].[ReportsTo] = [e1].[EmployeeID] +WHERE @__ef_filter__p_0 = CAST(1 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) OR [e].[IsDeleted] = CAST(0 AS bit) + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.SA.MS,False).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.SA.MS,False).sql new file mode 100644 index 00000000000..52ce94a469e --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.SA.MS,False).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT MAX([p].[QuantityPerUnit]) +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'U%' + + diff --git a/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.SA.MS,True).sql b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.SA.MS,True).sql new file mode 100644 index 00000000000..52ce94a469e --- /dev/null +++ b/SqlServer.SA.MS.EF9/LinqToDB/EntityFrameworkCore/Tests/ToolsTests/LinqToDB.EntityFrameworkCore.Tests.ToolsTests.TestTransaction(SqlServer.SA.MS,True).sql @@ -0,0 +1,8 @@ +Parameters: +@__ef_filter__p_0='?' (DbType = Boolean) + +SELECT MAX([p].[QuantityPerUnit]) +FROM [Products] AS [p] +WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit) OR [p].[IsDeleted] = CAST(0 AS bit)) AND [p].[ProductName] LIKE N'U%' + +