You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30549 lines
1.2 MiB
30549 lines
1.2 MiB
EntityFramework.Jet.FunctionalTests.FiltersJetTest.Compiled_query() :
|
|
AssertSql(
|
|
@"@__customerID='BERGS' (Size = 255)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = @__customerID",
|
|
//
|
|
@"@__customerID='BLAUS' (Size = 255)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = @__customerID");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_correlated_filtered_collection_works_with_caching() :
|
|
AssertSql(
|
|
@"SELECT [t].[GearNickName]
|
|
FROM [CogTag] AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_alias_generation(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"SELECT [o#OrderDetails].[OrderID], [o#OrderDetails].[ProductID], [o#OrderDetails].[Discount], [o#OrderDetails].[Quantity], [o#OrderDetails].[UnitPrice]
|
|
FROM [Order Details] AS [o#OrderDetails]
|
|
INNER JOIN (
|
|
SELECT [o0].[OrderID]
|
|
FROM [Orders] AS [o0]
|
|
) AS [t] ON [o#OrderDetails].[OrderID] = [t].[OrderID]
|
|
ORDER BY [t].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Include_on_GroupJoin_SelectMany_DefaultIfEmpty_with_inheritance_and_coalesce_result() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank], [t].[Nickname], [t].[SquadId], [t].[AssignedCityName], [t].[CityOrBirthName], [t].[Discriminator], [t].[FullName], [t].[HasSoulPatch], [t].[LeaderNickname], [t].[LeaderSquadId], [t].[Rank]
|
|
FROM [Gear] AS [g]
|
|
LEFT JOIN (
|
|
SELECT [g2].*
|
|
FROM [Gear] AS [g2]
|
|
WHERE [g2].[Discriminator] = 'Officer'
|
|
) AS [t] ON [g].[LeaderNickname] = [t].[Nickname]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear')
|
|
ORDER BY [t].[FullName], [g].[FullName]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_ternary_operation_with_has_value_not_null() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
[w].[AmmunitionType] IS NOT NULL AND ([w].[AmmunitionType] = 1),
|
|
'Yes',
|
|
'No'
|
|
) AS [IsCartidge]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[AmmunitionType] IS NOT NULL AND ([w].[AmmunitionType] = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersJetTest.Include_query_opt_out() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_inverted_boolean() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
[w].[IsAutomatic] = False,
|
|
True,
|
|
False
|
|
) AS [Manual]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[IsAutomatic] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Include_on_GroupJoin_SelectMany_DefaultIfEmpty_with_complex_projection_result() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank], [t].[Nickname], [t].[SquadId], [t].[AssignedCityName], [t].[CityOrBirthName], [t].[Discriminator], [t].[FullName], [t].[HasSoulPatch], [t].[LeaderNickname], [t].[LeaderSquadId], [t].[Rank]
|
|
FROM [Gear] AS [g]
|
|
LEFT JOIN (
|
|
SELECT [g2].*
|
|
FROM [Gear] AS [g2]
|
|
WHERE [g2].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t] ON [g].[LeaderNickname] = [t].[Nickname]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear')
|
|
ORDER BY [g].[FullName], [t].[FullName]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Sum_with_optional_navigation_is_translated_to_sql() :
|
|
AssertSql(
|
|
@"SELECT SUM([g].[SquadId])
|
|
FROM [Gear] AS [g]
|
|
LEFT JOIN [CogTag] AS [g#Tag] ON ([g].[Nickname] = [g#Tag].[GearNickName]) AND ([g].[SquadId] = [g#Tag].[GearSquadId])
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g#Tag].[Note] <> 'Foo') OR [g#Tag].[Note] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_of_type_kiwi() :
|
|
AssertSql(
|
|
@"SELECT [k].[Species], [k].[CountryId], [k].[Discriminator], [k].[Name], [k].[EagleId], [k].[IsFlightless], [k].[FoundOn]
|
|
FROM [Animal] AS [k]
|
|
WHERE ([k].[Discriminator] = 'Kiwi') AND ([k].[CountryId] = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_of_type_bird_first() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [b].[Species], [b].[CountryId], [b].[Discriminator], [b].[Name], [b].[EagleId], [b].[IsFlightless], [b].[Group], [b].[FoundOn]
|
|
FROM [Animal] AS [b]
|
|
WHERE [b].[Discriminator] IN ('Kiwi', 'Eagle') AND ([b].[CountryId] = 1)
|
|
ORDER BY [b].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_is_kiwi_in_projection() :
|
|
AssertSql(
|
|
@"SELECT IIf(
|
|
[a].[Discriminator] = 'Kiwi',
|
|
True,
|
|
False
|
|
)
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle') AND ([a].[CountryId] = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_alias_generation(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"SELECT [o#OrderDetails].[OrderID], [o#OrderDetails].[ProductID], [o#OrderDetails].[Discount], [o#OrderDetails].[Quantity], [o#OrderDetails].[UnitPrice]
|
|
FROM [Order Details] AS [o#OrderDetails]
|
|
INNER JOIN (
|
|
SELECT [o0].[OrderID]
|
|
FROM [Orders] AS [o0]
|
|
) AS [t] ON [o#OrderDetails].[OrderID] = [t].[OrderID]
|
|
ORDER BY [t].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_of_type_bird_with_projection() :
|
|
AssertSql(
|
|
@"SELECT [b].[EagleId]
|
|
FROM [Animal] AS [b]
|
|
WHERE [b].[Discriminator] IN ('Kiwi', 'Eagle') AND ([b].[CountryId] = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_is_kiwi() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE ([a].[Discriminator] IN ('Kiwi', 'Eagle') AND ([a].[CountryId] = 1)) AND ([a].[Discriminator] = 'Kiwi')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_of_type_bird_predicate() :
|
|
AssertSql(
|
|
@"SELECT [b].[Species], [b].[CountryId], [b].[Discriminator], [b].[Name], [b].[EagleId], [b].[IsFlightless], [b].[Group], [b].[FoundOn]
|
|
FROM [Animal] AS [b]
|
|
WHERE ([b].[Discriminator] IN ('Kiwi', 'Eagle') AND ([b].[CountryId] = 1)) AND ([b].[CountryId] = 1)
|
|
ORDER BY [b].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_of_type_animal() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle') AND ([a].[CountryId] = 1)
|
|
ORDER BY [a].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_of_type_bird() :
|
|
AssertSql(
|
|
@"SELECT [b].[Species], [b].[CountryId], [b].[Discriminator], [b].[Name], [b].[EagleId], [b].[IsFlightless], [b].[Group], [b].[FoundOn]
|
|
FROM [Animal] AS [b]
|
|
WHERE [b].[Discriminator] IN ('Kiwi', 'Eagle') AND ([b].[CountryId] = 1)
|
|
ORDER BY [b].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_is_kiwi_with_other_predicate() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE ([a].[Discriminator] IN ('Kiwi', 'Eagle') AND ([a].[CountryId] = 1)) AND (([a].[Discriminator] = 'Kiwi') AND ([a].[CountryId] = 1))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_comparison_with_null() :
|
|
AssertSql(
|
|
@"@__ammunitionType_1='Cartridge' (Nullable = true)
|
|
@__ammunitionType_0='Cartridge' (Nullable = true)
|
|
|
|
SELECT [w].[Id], IIf(
|
|
[w].[AmmunitionType] = @__ammunitionType_1,
|
|
True,
|
|
False
|
|
) AS [Cartidge]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[AmmunitionType] = @__ammunitionType_0",
|
|
//
|
|
@"SELECT [w].[Id], IIf(
|
|
[w].[AmmunitionType] IS NULL,
|
|
True,
|
|
False
|
|
) AS [Cartidge]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[AmmunitionType] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Entity_equality_empty() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[Nickname] IS NULL AND ([g].[SquadId] = 0))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Discriminator_used_when_projection_over_of_type() :
|
|
AssertSql(
|
|
@"SELECT [k].[FoundOn]
|
|
FROM [Animal] AS [k]
|
|
WHERE [k].[Discriminator] = 'Kiwi'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_query_all_types_when_shared_column() :
|
|
AssertSql(
|
|
@"SELECT [d].[Id], [d].[Discriminator], [d].[CaffeineGrams], [d].[CokeCO2], [d].[SugarGrams], [d].[LiltCO2], [d].[HasMilk]
|
|
FROM [Drink] AS [d]
|
|
WHERE [d].[Discriminator] IN ('Tea', 'Lilt', 'Coke', 'Drink')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_of_type_kiwi_where_north_on_derived_property() :
|
|
AssertSql(
|
|
@"SELECT [x].[Species], [x].[CountryId], [x].[Discriminator], [x].[Name], [x].[EagleId], [x].[IsFlightless], [x].[FoundOn]
|
|
FROM [Animal] AS [x]
|
|
WHERE ([x].[Discriminator] = 'Kiwi') AND ([x].[FoundOn] = 0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_alias_generation(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice], [o#Order].[OrderID], [o#Order].[CustomerID], [o#Order].[EmployeeID], [o#Order].[OrderDate]
|
|
FROM [Order Details] AS [o]
|
|
INNER JOIN [Orders] AS [o#Order] ON [o].[OrderID] = [o#Order].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_include_prey() :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [e].[Species], [e].[CountryId], [e].[Discriminator], [e].[Name], [e].[EagleId], [e].[IsFlightless], [e].[Group]
|
|
FROM [Animal] AS [e]
|
|
WHERE [e].[Discriminator] = 'Eagle'
|
|
ORDER BY [e].[Species]",
|
|
//
|
|
@"SELECT [e#Prey].[Species], [e#Prey].[CountryId], [e#Prey].[Discriminator], [e#Prey].[Name], [e#Prey].[EagleId], [e#Prey].[IsFlightless], [e#Prey].[Group], [e#Prey].[FoundOn]
|
|
FROM [Animal] AS [e#Prey]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [e0].[Species]
|
|
FROM [Animal] AS [e0]
|
|
WHERE [e0].[Discriminator] = 'Eagle'
|
|
ORDER BY [e0].[Species]
|
|
) AS [t] ON [e#Prey].[EagleId] = [t].[Species]
|
|
WHERE [e#Prey].[Discriminator] IN ('Kiwi', 'Eagle')
|
|
ORDER BY [t].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Discriminator_used_when_projection_over_derived_type() :
|
|
AssertSql(
|
|
@"SELECT [k].[FoundOn]
|
|
FROM [Animal] AS [k]
|
|
WHERE [k].[Discriminator] = 'Kiwi'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_of_type_animal() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle')
|
|
ORDER BY [a].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_of_type_bird() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle')
|
|
ORDER BY [a].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_query_when_shared_column() :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [d].[Id], [d].[Discriminator], [d].[CaffeineGrams], [d].[CokeCO2], [d].[SugarGrams]
|
|
FROM [Drink] AS [d]
|
|
WHERE [d].[Discriminator] = 'Coke'",
|
|
//
|
|
@"SELECT TOP 2 [d].[Id], [d].[Discriminator], [d].[LiltCO2], [d].[SugarGrams]
|
|
FROM [Drink] AS [d]
|
|
WHERE [d].[Discriminator] = 'Lilt'",
|
|
//
|
|
@"SELECT TOP 2 [d].[Id], [d].[Discriminator], [d].[CaffeineGrams], [d].[HasMilk]
|
|
FROM [Drink] AS [d]
|
|
WHERE [d].[Discriminator] = 'Tea'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_of_type_kiwi_where_south_on_derived_property() :
|
|
AssertSql(
|
|
@"SELECT [x].[Species], [x].[CountryId], [x].[Discriminator], [x].[Name], [x].[EagleId], [x].[IsFlightless], [x].[FoundOn]
|
|
FROM [Animal] AS [x]
|
|
WHERE ([x].[Discriminator] = 'Kiwi') AND ([x].[FoundOn] = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_is_kiwi_with_other_predicate() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle') AND (([a].[Discriminator] = 'Kiwi') AND ([a].[CountryId] = 1))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_of_type_bird_with_projection() :
|
|
AssertSql(
|
|
@"SELECT [b].[EagleId]
|
|
FROM [Animal] AS [b]
|
|
WHERE [b].[Discriminator] IN ('Kiwi', 'Eagle')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_query_just_roses() :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [p].[Species], [p].[CountryId], [p].[Genus], [p].[Name], [p].[HasThorns]
|
|
FROM [Plant] AS [p]
|
|
WHERE [p].[Genus] = 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_of_type_bird_predicate() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle') AND ([a].[CountryId] = 1)
|
|
ORDER BY [a].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_is_kiwi_in_projection() :
|
|
AssertSql(
|
|
@"SELECT IIf(
|
|
[a].[Discriminator] = 'Kiwi',
|
|
True,
|
|
False
|
|
)
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_query_just_kiwis() :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] = 'Kiwi'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_include_animals() :
|
|
AssertSql(
|
|
@"SELECT [c].[Id], [c].[Name]
|
|
FROM [Country] AS [c]
|
|
ORDER BY [c].[Name], [c].[Id]",
|
|
//
|
|
@"SELECT [c#Animals].[Species], [c#Animals].[CountryId], [c#Animals].[Discriminator], [c#Animals].[Name], [c#Animals].[EagleId], [c#Animals].[IsFlightless], [c#Animals].[Group], [c#Animals].[FoundOn]
|
|
FROM [Animal] AS [c#Animals]
|
|
INNER JOIN (
|
|
SELECT [c0].[Id], [c0].[Name]
|
|
FROM [Country] AS [c0]
|
|
) AS [t] ON [c#Animals].[CountryId] = [t].[Id]
|
|
WHERE [c#Animals].[Discriminator] IN ('Kiwi', 'Eagle')
|
|
ORDER BY [t].[Name], [t].[Id]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_filter_all_animals() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle') AND ([a].[Name] = 'Great spotted kiwi')
|
|
ORDER BY [a].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_of_type_kiwi() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] = 'Kiwi'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_is_kiwi() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle') AND ([a].[Discriminator] = 'Kiwi')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_of_type_bird_first() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle')
|
|
ORDER BY [a].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Discriminator_used_when_projection_over_derived_type2() :
|
|
AssertSql(
|
|
@"SELECT [b].[IsFlightless], [b].[Discriminator]
|
|
FROM [Animal] AS [b]
|
|
WHERE [b].[Discriminator] IN ('Kiwi', 'Eagle')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_query_all_animals() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle')
|
|
ORDER BY [a].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_alias_generation(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice], [o#Order].[OrderID], [o#Order].[CustomerID], [o#Order].[EmployeeID], [o#Order].[OrderDate]
|
|
FROM [Order Details] AS [o]
|
|
INNER JOIN [Orders] AS [o#Order] ON [o].[OrderID] = [o#Order].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_join_clause_with_order_by_and_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[City], [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
INNER JOIN [Orders] AS [o0] ON [c0].[CustomerID] = [o0].[CustomerID]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[City], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_join_clause_with_order_by_and_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[City], [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
INNER JOIN [Orders] AS [o0] ON [c0].[CustomerID] = [o0].[CustomerID]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[City], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_dependent_already_tracked_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_dependent_already_tracked_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Where_subquery_on_navigation_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [o4].[OrderID]
|
|
FROM [Orders] AS [o4]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Size = 255)
|
|
|
|
SELECT [o2].[OrderID]
|
|
FROM [Orders] AS [o2]
|
|
WHERE @_outer_CustomerID = [o2].[CustomerID]",
|
|
//
|
|
@"SELECT [o4].[OrderID]
|
|
FROM [Orders] AS [o4]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Size = 255)
|
|
|
|
SELECT [o2].[OrderID]
|
|
FROM [Orders] AS [o2]
|
|
WHERE @_outer_CustomerID = [o2].[CustomerID]",
|
|
//
|
|
@"SELECT [o4].[OrderID]
|
|
FROM [Orders] AS [o4]",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Size = 255)
|
|
|
|
SELECT [o2].[OrderID]
|
|
FROM [Orders] AS [o2]
|
|
WHERE @_outer_CustomerID = [o2].[CustomerID]",
|
|
//
|
|
@"SELECT [o4].[OrderID]
|
|
FROM [Orders] AS [o4]",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Size = 255)
|
|
|
|
SELECT [o2].[OrderID]
|
|
FROM [Orders] AS [o2]
|
|
WHERE @_outer_CustomerID = [o2].[CustomerID]");
|
|
|
|
Output truncated.
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Collection_select_nav_prop_first_or_default_then_nav_prop() :
|
|
AssertSql(
|
|
@"SELECT [e].[CustomerID]
|
|
FROM [Customers] AS [e]
|
|
WHERE [e].[CustomerID] LIKE 'A' + '%' AND (LEFT([e].[CustomerID], LEN('A')) = 'A')
|
|
ORDER BY [e].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Size = 255)
|
|
|
|
SELECT TOP 1 [e#Customer].[CustomerID], [e#Customer].[Address], [e#Customer].[City], [e#Customer].[CompanyName], [e#Customer].[ContactName], [e#Customer].[ContactTitle], [e#Customer].[Country], [e#Customer].[Fax], [e#Customer].[Phone], [e#Customer].[PostalCode], [e#Customer].[Region]
|
|
FROM [Orders] AS [e0]
|
|
LEFT JOIN [Customers] AS [e#Customer] ON [e0].[CustomerID] = [e#Customer].[CustomerID]
|
|
WHERE [e0].[OrderID] IN (10643, 10692, 10702, 10835, 10952, 11011) AND (@_outer_CustomerID = [e0].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Size = 255)
|
|
|
|
SELECT TOP 1 [e#Customer].[CustomerID], [e#Customer].[Address], [e#Customer].[City], [e#Customer].[CompanyName], [e#Customer].[ContactName], [e#Customer].[ContactTitle], [e#Customer].[Country], [e#Customer].[Fax], [e#Customer].[Phone], [e#Customer].[PostalCode], [e#Customer].[Region]
|
|
FROM [Orders] AS [e0]
|
|
LEFT JOIN [Customers] AS [e#Customer] ON [e0].[CustomerID] = [e#Customer].[CustomerID]
|
|
WHERE [e0].[OrderID] IN (10643, 10692, 10702, 10835, 10952, 11011) AND (@_outer_CustomerID = [e0].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Size = 255)
|
|
|
|
SELECT TOP 1 [e#Customer].[CustomerID], [e#Customer].[Address], [e#Customer].[City], [e#Customer].[CompanyName], [e#Customer].[ContactName], [e#Customer].[ContactTitle], [e#Customer].[Country], [e#Customer].[Fax], [e#Customer].[Phone], [e#Customer].[PostalCode], [e#Customer].[Region]
|
|
FROM [Orders] AS [e0]
|
|
LEFT JOIN [Customers] AS [e#Customer] ON [e0].[CustomerID] = [e#Customer].[CustomerID]
|
|
WHERE [e0].[OrderID] IN (10643, 10692, 10702, 10835, 10952, 11011) AND (@_outer_CustomerID = [e0].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Size = 255)
|
|
|
|
SELECT TOP 1 [e#Customer].[CustomerID], [e#Customer].[Address], [e#Customer].[City], [e#Customer].[CompanyName], [e#Customer].[ContactName], [e#Customer].[ContactTitle], [e#Customer].[Country], [e#Customer].[Fax], [e#Customer].[Phone], [e#Customer].[PostalCode], [e#Customer].[Region]
|
|
FROM [Orders] AS [e0]
|
|
LEFT JOIN [Customers] AS [e#Customer] ON [e0].[CustomerID] = [e#Customer].[CustomerID]
|
|
WHERE [e0].[OrderID] IN (10643, 10692, 10702, 10835, 10952, 11011) AND (@_outer_CustomerID = [e0].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Navigation_fk_based_inside_contains() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] IN ('ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Collection_where_nav_prop_all() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE NOT EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE ([c].[CustomerID] = [o].[CustomerID]) AND (([o].[CustomerID] <> 'ALFKI') OR [o].[CustomerID] IS NULL))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.GroupBy_on_nav_prop() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[City]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
ORDER BY [o#Customer].[City]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Compare_simple_zero() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <> 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] > 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] > 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_Where_Count_with_predicate_client_eval_mixed() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[CustomerID] <> 'ALFKI') OR [o].[CustomerID] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_StartsWith_Column() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[ContactName] LIKE [c].[ContactName] + '%' AND (LEFT([c].[ContactName], LEN([c].[ContactName])) = [c].[ContactName])) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Join_with_nav_projected_in_subquery_when_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [od0].[OrderID], [od0].[ProductID], [od0].[Discount], [od0].[Quantity], [od0].[UnitPrice], [od#Product0].[ProductID], [od#Product0].[Discontinued], [od#Product0].[ProductName], [od#Product0].[UnitPrice], [od#Product0].[UnitsInStock]
|
|
FROM [Order Details] AS [od0]
|
|
INNER JOIN [Products] AS [od#Product0] ON [od0].[ProductID] = [od#Product0].[ProductID]",
|
|
//
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate], [o#Customer0].[CustomerID], [o#Customer0].[Address], [o#Customer0].[City], [o#Customer0].[CompanyName], [o#Customer0].[ContactName], [o#Customer0].[ContactTitle], [o#Customer0].[Country], [o#Customer0].[Fax], [o#Customer0].[Phone], [o#Customer0].[PostalCode], [o#Customer0].[Region]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_client_and_server_top_level() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <> 'AROUT'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_shadow() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[Title] = 'Sales Representative'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_project_filter() :
|
|
AssertSql(
|
|
@"SELECT [c].[CompanyName]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_dependent_already_tracked(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_StartsWith_MethodCall() :
|
|
AssertSql(
|
|
@"@__LocalMethod1_0='M' (Size = 4000)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[ContactName] LIKE @__LocalMethod1_0 + '%' AND (LEFT([c].[ContactName], LEN(@__LocalMethod1_0)) = @__LocalMethod1_0)) OR (@__LocalMethod1_0 = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.First_inside_subquery_gets_client_evaluated() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Size = 255)
|
|
|
|
SELECT TOP 1 [o0].[CustomerID]
|
|
FROM [Orders] AS [o0]
|
|
WHERE ([o0].[CustomerID] = 'ALFKI') AND (@_outer_CustomerID = [o0].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_Count_with_predicate() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition4() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT [t].[CustomerID], [t].[Address], [t].[City], [t].[CompanyName], [t].[ContactName], [t].[ContactTitle], [t].[Country], [t].[Fax], [t].[Phone], [t].[PostalCode], [t].[Region]
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t]",
|
|
//
|
|
@"SELECT 1
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID]",
|
|
//
|
|
@"SELECT [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region]
|
|
FROM [Customers] AS [c2]",
|
|
//
|
|
@"SELECT 1
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID]",
|
|
//
|
|
@"SELECT [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region]
|
|
FROM [Customers] AS [c2]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_method_string() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_dependent_already_tracked(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_join_clause_with_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
INNER JOIN [Orders] AS [o0] ON [c0].[CustomerID] = [o0].[CustomerID]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_collection_navigation_simple() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] LIKE 'A' + '%' AND (LEFT([c0].[CustomerID], LEN('A')) = 'A')
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_Where_OrderBy() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE ([o].[CustomerID] = 'ALFKI') OR ([c].[CustomerID] = 'ANATR')
|
|
ORDER BY [c].[City]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_Subquery_Single() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT TOP @__p_0 [od].[OrderID]
|
|
FROM [Order Details] AS [od]
|
|
ORDER BY [od].[ProductID], [od].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10285'
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_OrderID = [o].[OrderID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10294'
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_OrderID = [o].[OrderID]
|
|
ORDER BY [o].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_Distinct_Count() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [t].*
|
|
FROM (
|
|
SELECT TOP @__p_0 [o].*
|
|
FROM [Orders] AS [o]
|
|
) AS [t]
|
|
) AS [t0]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_int_to_string() :
|
|
AssertSql(
|
|
@"SELECT Str([o].[OrderID]) AS [ShipName]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_is_null() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]",
|
|
//
|
|
@"@_outer_ReportsTo='2' (Nullable = true)
|
|
|
|
SELECT TOP 2 [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = @_outer_ReportsTo",
|
|
//
|
|
@"SELECT TOP 2 [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] IS NULL",
|
|
//
|
|
@"@_outer_ReportsTo='2' (Nullable = true)
|
|
|
|
SELECT TOP 2 [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = @_outer_ReportsTo");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Collection_where_nav_prop_all_client() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Size = 255)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Size = 255)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Size = 255)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Size = 255)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BERGS' (Size = 255)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BLAUS' (Size = 255)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BLONP' (Size = 255)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BOLID' (Size = 255)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]");
|
|
|
|
Output truncated.
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Navigations_Where_Navigations() :
|
|
AssertSql(
|
|
@"SELECT [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE ([o#Customer].[City] = 'Seattle') AND (([o#Customer].[Phone] <> '555 555 5555') OR [o#Customer].[Phone] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_conditional_operator() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(
|
|
[c].[Region] IS NULL,
|
|
'ZZ',
|
|
[c].[Region]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Singleton_Navigation_With_Member_Access() :
|
|
AssertSql(
|
|
@"SELECT [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City] AS [B], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE ([o#Customer].[City] = 'Seattle') AND (([o#Customer].[Phone] <> '555 555 5555') OR [o#Customer].[Phone] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Navigation() :
|
|
AssertSql(
|
|
@"SELECT [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_then_include_collection(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID], [c#Orders].[OrderID]",
|
|
//
|
|
@"SELECT [c#Orders#OrderDetails].[OrderID], [c#Orders#OrderDetails].[ProductID], [c#Orders#OrderDetails].[Discount], [c#Orders#OrderDetails].[Quantity], [c#Orders#OrderDetails].[UnitPrice]
|
|
FROM [Order Details] AS [c#Orders#OrderDetails]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c#Orders0].[OrderID], [t0].[CustomerID]
|
|
FROM [Orders] AS [c#Orders0]
|
|
INNER JOIN (
|
|
SELECT [c1].[CustomerID]
|
|
FROM [Customers] AS [c1]
|
|
) AS [t0] ON [c#Orders0].[CustomerID] = [t0].[CustomerID]
|
|
) AS [t1] ON [c#Orders#OrderDetails].[OrderID] = [t1].[OrderID]
|
|
ORDER BY [t1].[CustomerID], [t1].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_complex_predicate_not_matching_ins2() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI') AND [c].[CustomerID] NOT IN ('ALFKI', 'ABCDE')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Contains_Column() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (Instr([c].[ContactName], [c].[ContactName]) > 0) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Anonymous_member_distinct_where() :
|
|
AssertSql(
|
|
@"SELECT [t].[CustomerID]
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Contains_Identity() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (Instr([c].[ContactName], [c].[ContactName]) > 0) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_reversed() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE 'London' = [c].[City]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_concat_with_navigation2() :
|
|
AssertSql(
|
|
@"SELECT ([o#Customer].[City] + ' ') + [o#Customer].[City]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Join_with_nav_in_orderby_in_subquery_when_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [od0].[OrderID], [od0].[ProductID], [od0].[Discount], [od0].[Quantity], [od0].[UnitPrice], [od#Product0].[ProductID], [od#Product0].[Discontinued], [od#Product0].[ProductName], [od#Product0].[UnitPrice], [od#Product0].[UnitsInStock]
|
|
FROM [Order Details] AS [od0]
|
|
INNER JOIN [Products] AS [od#Product0] ON [od0].[ProductID] = [od#Product0].[ProductID]",
|
|
//
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate], [o#Customer0].[CustomerID], [o#Customer0].[Address], [o#Customer0].[City], [o#Customer0].[CompanyName], [o#Customer0].[ContactName], [o#Customer0].[ContactTitle], [o#Customer0].[Country], [o#Customer0].[Fax], [o#Customer0].[Phone], [o#Customer0].[PostalCode], [o#Customer0].[Region]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation_Contains() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE Instr([o#Customer].[City], 'Sea') > 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_Where_Count() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_EndsWith_Literal() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE RIGHT([c].[ContactName], LEN('b')) = 'b'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_order_by_non_key_with_first_or_default(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CompanyName] DESC, [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID], [c0].[CompanyName]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CompanyName] DESC, [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CompanyName] DESC, [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_order_by_non_key_with_first_or_default(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CompanyName] DESC, [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID], [c0].[CompanyName]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CompanyName] DESC, [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CompanyName] DESC, [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_with_filter_reordered(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_with_filter_reordered(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Where_nav_prop_group_by() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
INNER JOIN [Orders] AS [od#Order] ON [od].[OrderID] = [od#Order].[OrderID]
|
|
WHERE [od#Order].[CustomerID] = 'ALFKI'
|
|
ORDER BY [od].[Quantity]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Collection_select_nav_prop_single_or_default_then_nav_prop_nested() :
|
|
AssertSql(
|
|
@"SELECT 1
|
|
FROM [Customers] AS [e]
|
|
WHERE [e].[CustomerID] LIKE 'A' + '%' AND (LEFT([e].[CustomerID], LEN('A')) = 'A')",
|
|
//
|
|
@"SELECT TOP 2 [o#Customer0].[City]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]
|
|
WHERE [o0].[OrderID] = 10643",
|
|
//
|
|
@"SELECT TOP 2 [o#Customer0].[City]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]
|
|
WHERE [o0].[OrderID] = 10643",
|
|
//
|
|
@"SELECT TOP 2 [o#Customer0].[City]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]
|
|
WHERE [o0].[OrderID] = 10643",
|
|
//
|
|
@"SELECT TOP 2 [o#Customer0].[City]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]
|
|
WHERE [o0].[OrderID] = 10643");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_collection_FirstOrDefault_project_entity() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Size = 255)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Size = 255)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_take_no_order_by(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@__p_0='10'
|
|
|
|
SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_take_no_order_by(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@__p_0='10'
|
|
|
|
SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Singleton_Navigation_With_Member_Access() :
|
|
AssertSql(
|
|
@"SELECT [o#Customer].[City] AS [B]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE ([o#Customer].[City] = 'Seattle') AND (([o#Customer].[Phone] <> '555 555 5555') OR [o#Customer].[Phone] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested_negated3() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE NOT EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A')) AND (([c].[City] <> 'London') OR [c].[City] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_subquery_involving_join_binds_to_correct_table() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] > 11000) AND [o].[OrderID] IN (
|
|
SELECT [od].[OrderID]
|
|
FROM [Order Details] AS [od]
|
|
INNER JOIN [Products] AS [od#Product] ON [od].[ProductID] = [od#Product].[ProductID]
|
|
WHERE [od#Product].[ProductName] = 'Chai'
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_filter_reordered(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_filter_reordered(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.GroupJoin_with_nav_in_predicate_in_subquery_when_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [od0].[OrderID], [od0].[ProductID], [od0].[Discount], [od0].[Quantity], [od0].[UnitPrice], [od#Product0].[ProductID], [od#Product0].[Discontinued], [od#Product0].[ProductName], [od#Product0].[UnitPrice], [od#Product0].[UnitsInStock]
|
|
FROM [Order Details] AS [od0]
|
|
INNER JOIN [Products] AS [od#Product0] ON [od0].[ProductID] = [od#Product0].[ProductID]",
|
|
//
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate], [o#Customer0].[CustomerID], [o#Customer0].[Address], [o#Customer0].[City], [o#Customer0].[CompanyName], [o#Customer0].[ContactName], [o#Customer0].[ContactTitle], [o#Customer0].[Country], [o#Customer0].[Fax], [o#Customer0].[Phone], [o#Customer0].[PostalCode], [o#Customer0].[Region]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Project_single_entity_value_subquery_works() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Size = 255)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Size = 255)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Size = 255)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Size = 255)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition2() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]",
|
|
//
|
|
@"SELECT TOP 1 [e0].[EmployeeID], [e0].[City], [e0].[Country], [e0].[FirstName], [e0].[ReportsTo], [e0].[Title]
|
|
FROM [Employees] AS [e0]
|
|
ORDER BY [e0].[EmployeeID]",
|
|
//
|
|
@"SELECT TOP 1 [e0].[EmployeeID], [e0].[City], [e0].[Country], [e0].[FirstName], [e0].[ReportsTo], [e0].[Title]
|
|
FROM [Employees] AS [e0]
|
|
ORDER BY [e0].[EmployeeID]",
|
|
//
|
|
@"SELECT TOP 1 [e0].[EmployeeID], [e0].[City], [e0].[Country], [e0].[FirstName], [e0].[ReportsTo], [e0].[Title]
|
|
FROM [Employees] AS [e0]
|
|
ORDER BY [e0].[EmployeeID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_correlated_subquery_ordered() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID]
|
|
FROM [Customers] AS [c]",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.GroupJoin_with_nav_in_orderby_in_subquery_when_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [od0].[OrderID], [od0].[ProductID], [od0].[Discount], [od0].[Quantity], [od0].[UnitPrice], [od#Product0].[ProductID], [od#Product0].[Discontinued], [od#Product0].[ProductName], [od#Product0].[UnitPrice], [od#Product0].[UnitsInStock]
|
|
FROM [Order Details] AS [od0]
|
|
INNER JOIN [Products] AS [od#Product0] ON [od0].[ProductID] = [od#Product0].[ProductID]",
|
|
//
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate], [o#Customer0].[CustomerID], [o#Customer0].[Address], [o#Customer0].[City], [o#Customer0].[CompanyName], [o#Customer0].[ContactName], [o#Customer0].[ContactTitle], [o#Customer0].[Country], [o#Customer0].[Fax], [o#Customer0].[Phone], [o#Customer0].[PostalCode], [o#Customer0].[Region]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Take_Select_Navigation() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Size = 255)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Size = 255)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_take_max() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT MAX([t].[OrderID])
|
|
FROM (
|
|
SELECT TOP @__p_0 [o].[OrderID]
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Let_group_by_nav_prop() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice], [od#Order].[CustomerID] AS [customer]
|
|
FROM [Order Details] AS [od]
|
|
INNER JOIN [Orders] AS [od#Order] ON [od].[OrderID] = [od#Order].[OrderID]
|
|
ORDER BY [od#Order].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation_Included() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE [o#Customer].[City] = 'Seattle'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_list_inline() : line() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 6234
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.IsNullOrEmpty_in_predicate() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[Region] IS NULL OR ([c].[Region] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Join_with_nav_in_predicate_in_subquery_when_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [od0].[OrderID], [od0].[ProductID], [od0].[Discount], [od0].[Quantity], [od0].[UnitPrice], [od#Product0].[ProductID], [od#Product0].[Discontinued], [od#Product0].[ProductName], [od#Product0].[UnitPrice], [od#Product0].[UnitsInStock]
|
|
FROM [Order Details] AS [od0]
|
|
INNER JOIN [Products] AS [od#Product0] ON [od0].[ProductID] = [od#Product0].[ProductID]",
|
|
//
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate], [o#Customer0].[CustomerID], [o#Customer0].[Address], [o#Customer0].[City], [o#Customer0].[CompanyName], [o#Customer0].[ContactName], [o#Customer0].[ContactTitle], [o#Customer0].[Country], [o#Customer0].[Fax], [o#Customer0].[Phone], [o#Customer0].[PostalCode], [o#Customer0].[Region]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation_Client() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Navigation_inside_contains() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE [o#Customer].[City] IN ('Novigrad', 'Seattle')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_collection_FirstOrDefault_project_anonymous_type() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Size = 255)
|
|
|
|
SELECT TOP 1 [o].[CustomerID], [o].[OrderID]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Size = 255)
|
|
|
|
SELECT TOP 1 [o].[CustomerID], [o].[OrderID]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation_Multiple_Access() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE ([o#Customer].[City] = 'Seattle') AND (([o#Customer].[Phone] <> '555 555 5555') OR [o#Customer].[Phone] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Collection_select_nav_prop_first_or_default() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Size = 255)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Size = 255)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Size = 255)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Size = 255)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BERGS' (Size = 255)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BLAUS' (Size = 255)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BLONP' (Size = 255)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BOLID' (Size = 255)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]");
|
|
|
|
Output truncated.
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_and_collection(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"SELECT [o#OrderDetails].[OrderID], [o#OrderDetails].[ProductID], [o#OrderDetails].[Discount], [o#OrderDetails].[Quantity], [o#OrderDetails].[UnitPrice]
|
|
FROM [Order Details] AS [o#OrderDetails]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [o0].[OrderID]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]
|
|
) AS [t] ON [o#OrderDetails].[OrderID] = [t].[OrderID]
|
|
ORDER BY [t].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_customers_orders_with_subquery_anonymous_property_method_with_take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT [t].[OrderID], [t].[CustomerID], [t].[EmployeeID], [t].[OrderDate]
|
|
FROM (
|
|
SELECT TOP @__p_0 [o2].[OrderID], [o2].[CustomerID], [o2].[EmployeeID], [o2].[OrderDate]
|
|
FROM [Orders] AS [o2]
|
|
ORDER BY [o2].[OrderID]
|
|
) AS [t]",
|
|
//
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_simple() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_when_groupby(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[City], [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[City], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_when_groupby(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[City], [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[City], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_last_no_orderby(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID] DESC",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID] DESC
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_last_no_orderby(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID] DESC",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID] DESC
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Collection_select_nav_prop_all_client() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Size = 255)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Size = 255)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Size = 255)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Size = 255)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BERGS' (Size = 255)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BLAUS' (Size = 255)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BLONP' (Size = 255)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BOLID' (Size = 255)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]");
|
|
|
|
Output truncated.
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation_Null_Deep() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
LEFT JOIN [Employees] AS [e#Manager] ON [e].[ReportsTo] = [e#Manager].[EmployeeID]
|
|
WHERE [e#Manager].[ReportsTo] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_order_by_non_key(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[City], [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[City], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_order_by_non_key(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[City], [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[City], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_principal_already_tracked_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_principal_already_tracked_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_dependent_already_tracked(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_dependent_already_tracked(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested_negated2() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (([c].[City] <> 'London') OR [c].[City] IS NULL) AND NOT EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_subquery_projection() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT TOP @__p_0 [c].[City]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_negated_twice() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_one_element_SingleOrDefault() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]",
|
|
//
|
|
@"@_outer_ReportsTo='2' (Nullable = true)
|
|
|
|
SELECT TOP 2 [e20].[EmployeeID]
|
|
FROM [Employees] AS [e20]
|
|
WHERE [e20].[EmployeeID] = @_outer_ReportsTo",
|
|
//
|
|
@"SELECT TOP 2 [e20].[EmployeeID]
|
|
FROM [Employees] AS [e20]
|
|
WHERE [e20].[EmployeeID] IS NULL",
|
|
//
|
|
@"@_outer_ReportsTo='2' (Nullable = true)
|
|
|
|
SELECT TOP 2 [e20].[EmployeeID]
|
|
FROM [Employees] AS [e20]
|
|
WHERE [e20].[EmployeeID] = @_outer_ReportsTo");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Anonymous_complex_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] + [c].[City] AS [A]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[A] LIKE 'A' + '%' AND (LEFT([t].[A], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_OrderBy_Count() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT COUNT(*)
|
|
FROM (
|
|
SELECT TOP @__p_0 [o].*
|
|
FROM [Orders] AS [o]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Substring_with_client_eval() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[ContactName]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_conditional_order_by(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(
|
|
[c].[CustomerID] LIKE 'S' + '%' AND (LEFT([c].[CustomerID], LEN('S')) = 'S'),
|
|
1,
|
|
2
|
|
), [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID], IIf(
|
|
[c0].[CustomerID] LIKE 'S' + '%' AND (LEFT([c0].[CustomerID], LEN('S')) = 'S'),
|
|
1,
|
|
2
|
|
) AS [c]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[c], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_with_single() :
|
|
AssertSql(
|
|
@"@__p_0='1'
|
|
|
|
SELECT TOP 2 [t].*
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_conditional_order_by(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(
|
|
[c].[CustomerID] LIKE 'S' + '%' AND (LEFT([c].[CustomerID], LEN('S')) = 'S'),
|
|
1,
|
|
2
|
|
), [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID], IIf(
|
|
[c0].[CustomerID] LIKE 'S' + '%' AND (LEFT([c0].[CustomerID], LEN('S')) = 'S'),
|
|
1,
|
|
2
|
|
) AS [c]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[c], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_parameter() :
|
|
AssertSql(
|
|
@"@__prm_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE @__prm_0 = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_concat_with_navigation1() :
|
|
AssertSql(
|
|
@"SELECT ([o].[CustomerID] + ' ') + [o#Customer].[City]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_member_distinct_where() :
|
|
AssertSql(
|
|
@"SELECT [t].[Property]
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] AS [Property]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[Property] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_order_by_key(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Queryable_simple_anonymous_subquery() :
|
|
AssertSql(
|
|
@"@__p_0='91'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_as_no_tracking2(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@__p_0='5'
|
|
|
|
SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_as_no_tracking2(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@__p_0='5'
|
|
|
|
SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_orderBy_take_count() :
|
|
AssertSql(
|
|
@"@__p_0='7'
|
|
|
|
SELECT COUNT(*)
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[Country]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_principal_already_tracked(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_shadow_subquery_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[Title] = (
|
|
SELECT TOP 1 [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
ORDER BY [e2].[Title]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_with_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_Where_Count() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_take_min() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT MIN([t].[OrderID])
|
|
FROM (
|
|
SELECT TOP @__p_0 [o].[OrderID]
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_false() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_with_skip(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='80'
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName], [c].[CustomerID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_with_skip(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='80'
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName], [c].[CustomerID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_member_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] AS [Property]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[Property] LIKE 'A' + '%' AND (LEFT([t].[Property], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_multi_level_reference_and_collection_predicate(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE [o].[OrderID] = 10248
|
|
ORDER BY [o#Customer].[CustomerID]",
|
|
//
|
|
@"SELECT [o#Customer#Orders].[OrderID], [o#Customer#Orders].[CustomerID], [o#Customer#Orders].[EmployeeID], [o#Customer#Orders].[OrderDate]
|
|
FROM [Orders] AS [o#Customer#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [t].*
|
|
FROM (
|
|
SELECT TOP 1 [o#Customer0].[CustomerID]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]
|
|
WHERE [o0].[OrderID] = 10248
|
|
ORDER BY [o#Customer0].[CustomerID]
|
|
) AS [t]
|
|
) AS [t0] ON [o#Customer#Orders].[CustomerID] = [t0].[CustomerID]
|
|
ORDER BY [t0].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_multi_level_reference_and_collection_predicate(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE [o].[OrderID] = 10248
|
|
ORDER BY [o#Customer].[CustomerID]",
|
|
//
|
|
@"SELECT [o#Customer#Orders].[OrderID], [o#Customer#Orders].[CustomerID], [o#Customer#Orders].[EmployeeID], [o#Customer#Orders].[OrderDate]
|
|
FROM [Orders] AS [o#Customer#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [t].*
|
|
FROM (
|
|
SELECT TOP 1 [o#Customer0].[CustomerID]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]
|
|
WHERE [o0].[OrderID] = 10248
|
|
ORDER BY [o#Customer0].[CustomerID]
|
|
) AS [t]
|
|
) AS [t0] ON [o#Customer#Orders].[CustomerID] = [t0].[CustomerID]
|
|
ORDER BY [t0].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_EndsWith_Identity() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (RIGHT([c].[ContactName], LEN([c].[ContactName])) = [c].[ContactName]) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_de_morgan_and_optimizated() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ([p].[Discontinued] = False) OR ([p].[ProductID] >= 20)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Local_array() :
|
|
AssertSql(
|
|
@"@__get_Item_0='ALFKI' (Size = 255)
|
|
|
|
SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = @__get_Item_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_order_by_non_key_with_take(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactTitle], [c].[CustomerID]",
|
|
//
|
|
@"@__p_0='10'
|
|
|
|
SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [c0].[CustomerID], [c0].[ContactTitle]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[ContactTitle], [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[ContactTitle], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_order_by_non_key_with_take(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactTitle], [c].[CustomerID]",
|
|
//
|
|
@"@__p_0='10'
|
|
|
|
SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [c0].[CustomerID], [c0].[ContactTitle]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[ContactTitle], [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[ContactTitle], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_last(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CompanyName] DESC, [c].[CustomerID] DESC",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID], [c0].[CompanyName]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CompanyName] DESC, [c0].[CustomerID] DESC
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CompanyName] DESC, [t].[CustomerID] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_last(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CompanyName] DESC, [c].[CustomerID] DESC",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID], [c0].[CompanyName]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CompanyName] DESC, [c0].[CustomerID] DESC
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CompanyName] DESC, [t].[CustomerID] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_long_to_string() :
|
|
AssertSql(
|
|
@"SELECT Str([o].[OrderID]) AS [ShipName]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_with_take(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[City] DESC, [c].[CustomerID]",
|
|
//
|
|
@"@__p_0='10'
|
|
|
|
SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[City] DESC, [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[City] DESC, [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Distinct_Take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT TOP @__p_0 [t].[OrderID], [t].[CustomerID], [t].[EmployeeID], [t].[OrderDate]
|
|
FROM (
|
|
SELECT DISTINCT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
) AS [t]
|
|
ORDER BY [t].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_where_skip_take_projection(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_1='2'
|
|
@__p_0='1'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [od#Order].[CustomerID]
|
|
FROM [Order Details] AS [od]
|
|
INNER JOIN [Orders] AS [od#Order] ON [od].[OrderID] = [od#Order].[OrderID]
|
|
WHERE [od].[Quantity] = 10
|
|
ORDER BY [od].[OrderID], [od].[ProductID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_where_skip_take_projection(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_1='2'
|
|
@__p_0='1'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [od#Order].[CustomerID]
|
|
FROM [Order Details] AS [od]
|
|
INNER JOIN [Orders] AS [od#Order] ON [od].[OrderID] = [od#Order].[OrderID]
|
|
WHERE [od].[Quantity] = 10
|
|
ORDER BY [od].[OrderID], [od].[ProductID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested3() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A')) AND (([c].[City] <> 'London') OR [c].[City] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_EndsWith_MethodCall() :
|
|
AssertSql(
|
|
@"@__LocalMethod2_0='m' (Size = 4000)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (RIGHT([c].[ContactName], LEN(@__LocalMethod2_0)) = @__LocalMethod2_0) OR (@__LocalMethod2_0 = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_expression_invoke() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition2_FirstOrDefault() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]
|
|
WHERE [t].[FirstName] = (
|
|
SELECT TOP 1 [e0].[FirstName]
|
|
FROM [Employees] AS [e0]
|
|
ORDER BY [e0].[EmployeeID]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Anonymous_member_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[CustomerID] LIKE 'A' + '%' AND (LEFT([t].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_Customers_Orders_Projection_With_String_Concat_Skip_Take() :
|
|
AssertSql(
|
|
@"@__p_1='5'
|
|
@__p_0='10'
|
|
|
|
SELECT TOP @__p_1+@__p_0 ([c].[ContactName] + ' ') + [c].[ContactTitle] AS [Contact], [o].[OrderID]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_compared_to_binary_expression() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = IIf(
|
|
[p].[ProductID] > 50,
|
|
True,
|
|
False
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Null_conditional_simple() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_comparison_to_nullable_bool() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE RIGHT([c].[CustomerID], LEN('KI')) = 'KI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_subquery_and_local_array_closure() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Customers] AS [c1]
|
|
WHERE [c1].[City] IN ('London', 'Buenos Aires') AND ([c1].[CustomerID] = [c].[CustomerID]))",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Customers] AS [c1]
|
|
WHERE [c1].[City] IN ('London') AND ([c1].[CustomerID] = [c].[CustomerID]))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Distinct_Take_Count() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT TOP @__p_0 [o].*
|
|
FROM [Orders] AS [o]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_LastOrDefault() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Contains_Literal() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE Instr([c].[ContactName], 'M') > 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_on_mismatched_types_nullable_int_long() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True",
|
|
//
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_false() :
|
|
AssertSql(
|
|
@"@__flag_0='False'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ((@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)) OR ((@__flag_0 <> True) AND ([p].[UnitsInStock] < 20))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Single_Predicate() :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_simple_parameterized() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_complex_predicate_or() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI', 'ALFKI', 'ABCDE')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_with_multiple_conditions_still_uses_exists() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[City] = 'London') AND EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[EmployeeID] = 1) AND ([c].[CustomerID] = [o].[CustomerID]))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_other_to_string() :
|
|
AssertSql(
|
|
@"SELECT Str([o].[OrderDate]) AS [ShipName]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_join_select() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_sin() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (SIN([od].[Discount]) > 0E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_skip_take() :
|
|
AssertSql(
|
|
@"@__p_1='8'
|
|
@__p_0='5'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactTitle], [c].[ContactName]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_simple_subquery() :
|
|
AssertSql(
|
|
@"@__p_0='4'
|
|
|
|
SELECT [t].[OrderID], [t].[CustomerID], [t].[EmployeeID], [t].[OrderDate]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]
|
|
) AS [t] ON [c].[CustomerID] = [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_negated_boolean_expression_compared_to_another_negated_boolean_expression() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE IIf(
|
|
[p].[ProductID] > 50,
|
|
True,
|
|
False
|
|
) = IIf(
|
|
[p].[ProductID] > 20,
|
|
True,
|
|
False
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_StartsWith_Identity() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[ContactName] LIKE [c].[ContactName] + '%' AND (LEFT([c].[ContactName], LEN([c].[ContactName])) = [c].[ContactName])) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OfType_Select() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [o#Customer].[City]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
ORDER BY [o].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_complex_distinct_where() :
|
|
AssertSql(
|
|
@"SELECT [t].[Property]
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] + [c].[City] AS [Property]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[Property] = 'ALFKIBerlin'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_is_not_null() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]",
|
|
//
|
|
@"@_outer_ReportsTo='2' (Nullable = true)
|
|
|
|
SELECT TOP 2 [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = @_outer_ReportsTo",
|
|
//
|
|
@"SELECT TOP 2 [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] IS NULL",
|
|
//
|
|
@"@_outer_ReportsTo='2' (Nullable = true)
|
|
|
|
SELECT TOP 2 [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = @_outer_ReportsTo");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_customers_orders_with_subquery_with_take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT [c].[ContactName], [t].[OrderID]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [o2].*
|
|
FROM [Orders] AS [o2]
|
|
ORDER BY [o2].[OrderID]
|
|
) AS [t] ON [c].[CustomerID] = [t].[CustomerID]
|
|
WHERE [t].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_true() :
|
|
AssertSql(
|
|
@"@__flag_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ((@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)) OR ((@__flag_0 <> True) AND ([p].[UnitsInStock] < 20))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_complex_predicate_not_matching_ins1() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ALFKI', 'ABCDE') OR [c].[CustomerID] NOT IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_client_side_negated() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_Where_Distinct_Count() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [t].*
|
|
FROM (
|
|
SELECT TOP @__p_0 [o].*
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'FRANK'
|
|
) AS [t]
|
|
) AS [t0]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_multi_level() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Size = 255)
|
|
|
|
SELECT TOP 3 [o].[OrderDate] AS [Date]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND (@_outer_CustomerID = [o].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Size = 255)
|
|
|
|
SELECT TOP 3 [o].[OrderDate] AS [Date]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND (@_outer_CustomerID = [o].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Size = 255)
|
|
|
|
SELECT TOP 3 [o].[OrderDate] AS [Date]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND (@_outer_CustomerID = [o].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Size = 255)
|
|
|
|
SELECT TOP 3 [o].[OrderDate] AS [Date]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND (@_outer_CustomerID = [o].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_correlated_subquery_projection() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[CustomerID]
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
ORDER BY [t].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Size = 255)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = @_outer_CustomerID",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Size = 255)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = @_outer_CustomerID",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Size = 255)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = @_outer_CustomerID");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.IsNullOrEmpty_in_projection() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID] AS [Id], IIf(
|
|
[c].[Region] IS NULL OR ([c].[Region] = ''),
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_shadow_projection() :
|
|
AssertSql(
|
|
@"SELECT [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[Title] = 'Sales Representative'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_DefaultIfEmpty_Where() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Customers] AS [c]
|
|
LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [o].[OrderID] IS NOT NULL AND ([o].[CustomerID] = 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_constant_is_null() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested_negated() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE NOT EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Last() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_subquery_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__customerID_0='ALFKI' (Size = 255)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[CustomerID] = @__customerID_0) AND ([o].[CustomerID] = [c].[CustomerID]))",
|
|
//
|
|
@"@__customerID_0='ANATR' (Size = 255)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[CustomerID] = @__customerID_0) AND ([o].[CustomerID] = [c].[CustomerID]))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_exp() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (EXP([od].[Discount]) > 1E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Skip_Take() :
|
|
AssertSql(
|
|
@"@__p_1='10'
|
|
@__p_0='5'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_de_morgan_or_optimizated() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ([p].[Discontinued] = False) AND ([p].[ProductID] >= 20)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title]
|
|
FROM [Employees] AS [e1]
|
|
WHERE [e1].[FirstName] = (
|
|
SELECT TOP 1 [e].[FirstName]
|
|
FROM [Employees] AS [e]
|
|
ORDER BY [e].[EmployeeID]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_scalar_primitive_after_take() :
|
|
AssertSql(
|
|
@"@__p_0='9'
|
|
|
|
SELECT TOP @__p_0 [e].[EmployeeID]
|
|
FROM [Employees] AS [e]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.FirstOrDefault_inside_subquery_gets_server_evaluated() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[CustomerID] = 'ALFKI') AND ((
|
|
SELECT TOP 1 [o].[CustomerID]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[CustomerID] = 'ALFKI') AND ([c].[CustomerID] = [o].[CustomerID])
|
|
) = 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.IsNullOrWhiteSpace_in_predicate() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[Region] IS NULL OR (LTRIM(RTRIM([c].[Region])) = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_array_closure() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI')",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Query_expression_with_to_string_and_contains() :
|
|
AssertSql(
|
|
@"SELECT [o].[CustomerID]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL AND (Instr(Str([o].[EmployeeID]), '10') > 0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_simple_projection() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[City]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_subquery_on_bool() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE 'Chai' IN (
|
|
SELECT [p2].[ProductName]
|
|
FROM [Products] AS [p2]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_DefaultIfEmpty3() :
|
|
AssertSql(
|
|
@"@__p_0='1'
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t]
|
|
LEFT JOIN [Orders] AS [o] ON [t].[CustomerID] = [o].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_client_deep_inside_predicate_and_server_top_level() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <> 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_customers_orders_with_subquery_predicate_with_take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT [c].[ContactName], [t].[OrderID]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [o2].*
|
|
FROM [Orders] AS [o2]
|
|
WHERE [o2].[OrderID] > 0
|
|
ORDER BY [o2].[OrderID]
|
|
) AS [t] ON [c].[CustomerID] = [t].[CustomerID]
|
|
WHERE [t].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_false() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] NOT IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_parameter_compared_to_binary_expression() :
|
|
AssertSql(
|
|
@"@__prm_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE IIf(
|
|
[p].[ProductID] > 50,
|
|
True,
|
|
False
|
|
) <> @__prm_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Last_when_no_order_by() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_anonymous_conditional_expression() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], IIf(
|
|
[p].[UnitsInStock] > 0,
|
|
True,
|
|
False
|
|
) AS [IsAvailable]
|
|
FROM [Products] AS [p]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_not_bool_member_compared_to_binary_expression() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] <> IIf(
|
|
[p].[ProductID] > 50,
|
|
True,
|
|
False
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_orderby_join_select() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] <> 'ALFKI'
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_no_elements_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title]
|
|
FROM [Employees] AS [e1]
|
|
WHERE (
|
|
SELECT TOP 1 [e2].[EmployeeID]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = 42
|
|
) = 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_cos() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (COS([od].[Discount]) > 0E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested2() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (([c].[City] <> 'London') OR [c].[City] IS NULL) AND EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Count_with_predicate() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupBy_anonymous_with_where() :
|
|
AssertSql(
|
|
@"SELECT [c].[City], [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[Country] IN ('Argentina', 'Austria', 'Brazil', 'France', 'Germany', 'USA')
|
|
ORDER BY [c].[City]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_list_inline_closure_mix() : line_closure_mix() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 6244
|
|
AssertSql(
|
|
@"@__id_0='ALFKI' (Size = 255)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', @__id_0)",
|
|
//
|
|
@"@__id_0='ANATR' (Size = 255)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', @__id_0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_null_is_not_null() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_Where_Count_with_predicate() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] > 10) AND (([o].[CustomerID] <> 'ALFKI') OR [o].[CustomerID] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.IsNullOrEmpty_negated_in_projection() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID] AS [Id], IIf(
|
|
[c].[Region] IS NOT NULL AND ([c].[Region] <> ''),
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OfType_Select_OfType_Select() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [o#Customer].[City]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
ORDER BY [o].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_Where_Subquery_Equality() :
|
|
AssertSql(
|
|
@"@__p_0='1'
|
|
|
|
SELECT [t].[OrderID], [t].[CustomerID], [t].[EmployeeID], [t].[OrderDate]
|
|
FROM (
|
|
SELECT TOP @__p_0 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
) AS [t]
|
|
ORDER BY [t].[OrderID]",
|
|
//
|
|
@"SELECT [t1].[OrderID]
|
|
FROM (
|
|
SELECT TOP 2 [od0].*
|
|
FROM [Order Details] AS [od0]
|
|
ORDER BY [od0].[OrderID]
|
|
) AS [t1]",
|
|
//
|
|
@"@_outer_CustomerID2='VINET' (Size = 255)
|
|
|
|
SELECT TOP 1 [c3].[Country]
|
|
FROM [Customers] AS [c3]
|
|
WHERE [c3].[CustomerID] = @_outer_CustomerID2
|
|
ORDER BY [c3].[CustomerID]",
|
|
//
|
|
@"@_outer_OrderID1='10248'
|
|
|
|
SELECT TOP 1 [c4].[Country]
|
|
FROM [Orders] AS [o20]
|
|
INNER JOIN [Customers] AS [c4] ON [o20].[CustomerID] = [c4].[CustomerID]
|
|
WHERE [o20].[OrderID] = @_outer_OrderID1
|
|
ORDER BY [o20].[OrderID], [c4].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID2='VINET' (Size = 255)
|
|
|
|
SELECT TOP 1 [c3].[Country]
|
|
FROM [Customers] AS [c3]
|
|
WHERE [c3].[CustomerID] = @_outer_CustomerID2
|
|
ORDER BY [c3].[CustomerID]",
|
|
//
|
|
@"@_outer_OrderID1='10248'
|
|
|
|
SELECT TOP 1 [c4].[Country]
|
|
FROM [Orders] AS [o20]
|
|
INNER JOIN [Customers] AS [c4] ON [o20].[CustomerID] = [c4].[CustomerID]
|
|
WHERE [o20].[OrderID] = @_outer_OrderID1
|
|
ORDER BY [o20].[OrderID], [c4].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID2='VINET' (Size = 255)
|
|
|
|
SELECT TOP 1 [c3].[Country]
|
|
FROM [Customers] AS [c3]
|
|
WHERE [c3].[CustomerID] = @_outer_CustomerID2
|
|
ORDER BY [c3].[CustomerID]",
|
|
//
|
|
@"@_outer_OrderID1='10248'
|
|
|
|
SELECT TOP 1 [c4].[Country]
|
|
FROM [Orders] AS [o20]
|
|
INNER JOIN [Customers] AS [c4] ON [o20].[CustomerID] = [c4].[CustomerID]
|
|
WHERE [o20].[OrderID] = @_outer_OrderID1
|
|
ORDER BY [o20].[OrderID], [c4].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition2_FirstOrDefault_with_anonymous() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]",
|
|
//
|
|
@"SELECT TOP 1 [e0].[EmployeeID], [e0].[City], [e0].[Country], [e0].[FirstName], [e0].[ReportsTo], [e0].[Title]
|
|
FROM [Employees] AS [e0]
|
|
ORDER BY [e0].[EmployeeID]",
|
|
//
|
|
@"SELECT TOP 1 [e0].[EmployeeID], [e0].[City], [e0].[Country], [e0].[FirstName], [e0].[ReportsTo], [e0].[Title]
|
|
FROM [Employees] AS [e0]
|
|
ORDER BY [e0].[EmployeeID]",
|
|
//
|
|
@"SELECT TOP 1 [e0].[EmployeeID], [e0].[City], [e0].[Country], [e0].[FirstName], [e0].[ReportsTo], [e0].[Title]
|
|
FROM [Employees] AS [e0]
|
|
ORDER BY [e0].[EmployeeID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_Where_Subquery_Deep_Single() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE [od].[OrderID] = 10344",
|
|
//
|
|
@"@_outer_OrderID='10344'
|
|
|
|
SELECT TOP 2 [o0].[CustomerID]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_OrderID = [o0].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID1='WHITC' (Size = 255)
|
|
|
|
SELECT TOP 2 [c2].[City]
|
|
FROM [Customers] AS [c2]
|
|
WHERE @_outer_CustomerID1 = [c2].[CustomerID]",
|
|
//
|
|
@"@_outer_OrderID='10344'
|
|
|
|
SELECT TOP 2 [o0].[CustomerID]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_OrderID = [o0].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID1='WHITC' (Size = 255)
|
|
|
|
SELECT TOP 2 [c2].[City]
|
|
FROM [Customers] AS [c2]
|
|
WHERE @_outer_CustomerID1 = [c2].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_with_another_condition() :
|
|
AssertSql(
|
|
@"@__productId_0='15'
|
|
@__flag_1='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ([p].[ProductID] < @__productId_0) AND (((@__flag_1 = True) AND ([p].[UnitsInStock] >= 20)) OR ((@__flag_1 <> True) AND ([p].[UnitsInStock] < 20)))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_and_parameter_compared_to_binary_expression_nested() :
|
|
AssertSql(
|
|
@"@__prm_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = IIf(
|
|
IIf(
|
|
[p].[ProductID] > 50,
|
|
True,
|
|
False
|
|
) <> @__prm_0,
|
|
True,
|
|
False
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_Last() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Contains_MethodCall() :
|
|
AssertSql(
|
|
@"@__LocalMethod1_0='M' (Size = 4000)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (Instr([c].[ContactName], @__LocalMethod1_0) > 0) OR (@__LocalMethod1_0 = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_compare_with_parameter() :
|
|
AssertSql(
|
|
@"@__customer_CustomerID_0='ALFKI' (Size = 4000)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] > @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Size = 4000)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] < @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Size = 4000)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Size = 4000)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Size = 4000)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] >= @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Size = 4000)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] >= @__customer_CustomerID_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Anonymous_complex_distinct_where() :
|
|
AssertSql(
|
|
@"SELECT [t].[A]
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] + [c].[City] AS [A]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[A] = 'ALFKIBerlin'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_equals_constant() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_Distinct() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT DISTINCT [t].*
|
|
FROM (
|
|
SELECT TOP @__p_0 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_OrderBy_Count() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_with_false_as_result_false() :
|
|
AssertSql(
|
|
@"@__flag_0='False'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE (@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Compare_multi_predicate() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] >= 'ALFKI' AND [c].[CustomerID] < 'CACTU'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[ContactTitle] = 'Owner' AND [c].[Country] <> 'USA'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_complex_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] + [c].[City] AS [Property]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[Property] LIKE 'A' + '%' AND (LEFT([t].[Property], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_with_false_as_result_true() :
|
|
AssertSql(
|
|
@"@__flag_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE (@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_compare_null() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] IS NULL AND ([c].[Country] = 'UK')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_Take_Count() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT COUNT(*)
|
|
FROM (
|
|
SELECT TOP @__p_0 [o].*
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_take_count() :
|
|
AssertSql(
|
|
@"@__p_0='7'
|
|
|
|
SELECT COUNT(*)
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM [Customers] AS [c]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_subquery_correlated_client_eval() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT [t].[CustomerID], [t].[Address], [t].[City], [t].[CompanyName], [t].[ContactName], [t].[ContactTitle], [t].[Country], [t].[Fax], [t].[Phone], [t].[PostalCode], [t].[Region]
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
ORDER BY [t].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Size = 255)
|
|
|
|
SELECT [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region]
|
|
FROM [Customers] AS [c2]
|
|
WHERE @_outer_CustomerID = [c2].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Size = 255)
|
|
|
|
SELECT [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region]
|
|
FROM [Customers] AS [c2]
|
|
WHERE @_outer_CustomerID = [c2].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Size = 255)
|
|
|
|
SELECT [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region]
|
|
FROM [Customers] AS [c2]
|
|
WHERE @_outer_CustomerID = [c2].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Size = 255)
|
|
|
|
SELECT [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region]
|
|
FROM [Customers] AS [c2]
|
|
WHERE @_outer_CustomerID = [c2].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BERGS' (Size = 255)
|
|
|
|
SELECT [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region]
|
|
FROM [Customers] AS [c2]
|
|
WHERE @_outer_CustomerID = [c2].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Entity_equality_local() :
|
|
AssertSql(
|
|
@"@__local_0_CustomerID='ANATR' (Nullable = false) (Size = 255)
|
|
|
|
SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = @__local_0_CustomerID");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Queryable_simple_anonymous_projection_subquery() :
|
|
AssertSql(
|
|
@"@__p_0='91'
|
|
|
|
SELECT TOP @__p_0 [c].[City]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_primitive() :
|
|
AssertSql(
|
|
@"@__p_0='9'
|
|
|
|
SELECT [t].[EmployeeID]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]
|
|
WHERE [t].[EmployeeID] = 5");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_false() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = False");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_comparison_operator() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(
|
|
[c].[Region] = 'ASK',
|
|
True,
|
|
False
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_multiple_elements_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title]
|
|
FROM [Employees] AS [e1]
|
|
WHERE (
|
|
SELECT TOP 1 [e2].[EmployeeID]
|
|
FROM [Employees] AS [e2]
|
|
WHERE ([e2].[EmployeeID] <> [e1].[ReportsTo]) OR [e1].[ReportsTo] IS NULL
|
|
) = 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_using_object_overload_on_mismatched_types() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_complex_predicate_and() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ALFKI', 'ABCDE') AND [c].[CustomerID] IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_shadow() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_on_mismatched_types_nullable_long_nullable_int() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True",
|
|
//
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.SelectMany_mixed() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
ORDER BY [e].[EmployeeID]
|
|
) AS [t]",
|
|
//
|
|
@"SELECT [t0].[CustomerID], [t0].[Address], [t0].[City], [t0].[CompanyName], [t0].[ContactName], [t0].[ContactTitle], [t0].[Country], [t0].[Fax], [t0].[Phone], [t0].[PostalCode], [t0].[Region]
|
|
FROM (
|
|
SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t0]",
|
|
//
|
|
@"SELECT [t0].[CustomerID], [t0].[Address], [t0].[City], [t0].[CompanyName], [t0].[ContactName], [t0].[ContactTitle], [t0].[Country], [t0].[Fax], [t0].[Phone], [t0].[PostalCode], [t0].[Region]
|
|
FROM (
|
|
SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t0]",
|
|
//
|
|
@"SELECT [t0].[CustomerID], [t0].[Address], [t0].[City], [t0].[CompanyName], [t0].[ContactName], [t0].[ContactTitle], [t0].[Country], [t0].[Fax], [t0].[Phone], [t0].[PostalCode], [t0].[Region]
|
|
FROM (
|
|
SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t0]",
|
|
//
|
|
@"SELECT [t0].[CustomerID], [t0].[Address], [t0].[City], [t0].[CompanyName], [t0].[ContactName], [t0].[ContactTitle], [t0].[Country], [t0].[Fax], [t0].[Phone], [t0].[PostalCode], [t0].[Region]
|
|
FROM (
|
|
SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t0]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_StartsWith_Literal() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[ContactName] LIKE 'M' + '%' AND (LEFT([c].[ContactName], LEN('M')) = 'M')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_one_element_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title]
|
|
FROM [Employees] AS [e1]
|
|
WHERE (
|
|
SELECT TOP 1 [e2].[EmployeeID]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = [e1].[ReportsTo]
|
|
) = 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_false_shadow() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = False");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_tan() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (TAN([od].[Discount]) > 0E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_array_inline() : line() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 6214
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_conditional_operator_where_condition_null() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(
|
|
False = True,
|
|
'ZZ',
|
|
[c].[City]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Last_Predicate() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Entity_equality_local_inline() : line() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 175
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ANATR'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_Where() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Environment_newline_is_funcletized() : line_is_funcletized() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 6640
|
|
AssertSql(
|
|
@"@__NewLine_0='
|
|
' (Size = 4000)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (Instr([c].[CustomerID], @__NewLine_0) > 0) OR (@__NewLine_0 = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Compare_simple_one() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] > 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] < 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] >= 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] >= 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_no_elements_SingleOrDefault() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]",
|
|
//
|
|
@"SELECT TOP 2 [e20].[EmployeeID]
|
|
FROM [Employees] AS [e20]
|
|
WHERE [e20].[EmployeeID] = 42",
|
|
//
|
|
@"SELECT TOP 2 [e20].[EmployeeID]
|
|
FROM [Employees] AS [e20]
|
|
WHERE [e20].[EmployeeID] = 42",
|
|
//
|
|
@"SELECT TOP 2 [e20].[EmployeeID]
|
|
FROM [Employees] AS [e20]
|
|
WHERE [e20].[EmployeeID] = 42");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.LastOrDefault_Predicate() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_complex_negated_expression_optimized() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE (([p].[Discontinued] = False) AND ([p].[ProductID] < 60)) AND ([p].[ProductID] > 30)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_list_closure() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Subquery_member_pushdown_does_not_change_original_subquery_model() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[CustomerID], [t].[OrderID]
|
|
FROM (
|
|
SELECT TOP @__p_0 [o].*
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]
|
|
) AS [t]",
|
|
//
|
|
@"@_outer_CustomerID='VINET' (Size = 255)
|
|
|
|
SELECT TOP 2 [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = @_outer_CustomerID",
|
|
//
|
|
@"@_outer_CustomerID='TOMSP' (Size = 255)
|
|
|
|
SELECT TOP 2 [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = @_outer_CustomerID",
|
|
//
|
|
@"@_outer_CustomerID='HANAR' (Size = 255)
|
|
|
|
SELECT TOP 2 [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = @_outer_CustomerID",
|
|
//
|
|
@"@_outer_CustomerID1='TOMSP' (Size = 255)
|
|
|
|
SELECT TOP 2 [c2].[City]
|
|
FROM [Customers] AS [c2]
|
|
WHERE [c2].[CustomerID] = @_outer_CustomerID1",
|
|
//
|
|
@"@_outer_CustomerID1='VINET' (Size = 255)
|
|
|
|
SELECT TOP 2 [c2].[City]
|
|
FROM [Customers] AS [c2]
|
|
WHERE [c2].[CustomerID] = @_outer_CustomerID1",
|
|
//
|
|
@"@_outer_CustomerID1='HANAR' (Size = 255)
|
|
|
|
SELECT TOP 2 [c2].[City]
|
|
FROM [Customers] AS [c2]
|
|
WHERE [c2].[CustomerID] = @_outer_CustomerID1");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_Where_Count_with_predicate_client_eval_mixed() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[CustomerID] <> 'ALFKI') OR [o].[CustomerID] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_method_call_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__GetCity_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__GetCity_0",
|
|
//
|
|
@"@__GetCity_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__GetCity_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_StartsWith_Column() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[ContactName] LIKE [c].[ContactName] + '%' AND (LEFT([c].[ContactName], LEN([c].[ContactName])) = [c].[ContactName])) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_alias_generation(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"SELECT [o#OrderDetails].[OrderID], [o#OrderDetails].[ProductID], [o#OrderDetails].[Discount], [o#OrderDetails].[Quantity], [o#OrderDetails].[UnitPrice]
|
|
FROM [Order Details] AS [o#OrderDetails]
|
|
INNER JOIN (
|
|
SELECT [o0].[OrderID]
|
|
FROM [Orders] AS [o0]
|
|
) AS [t] ON [o#OrderDetails].[OrderID] = [t].[OrderID]
|
|
ORDER BY [t].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_client_and_server_top_level() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <> 'AROUT'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_shadow() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[Title] = 'Sales Representative'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_project_filter() :
|
|
AssertSql(
|
|
@"SELECT [c].[CompanyName]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_StartsWith_MethodCall() :
|
|
AssertSql(
|
|
@"@__LocalMethod1_0='M' (Nullable = false) (Size = 1)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[ContactName] LIKE @__LocalMethod1_0 + '%' AND (LEFT([c].[ContactName], LEN(@__LocalMethod1_0)) = @__LocalMethod1_0)) OR (@__LocalMethod1_0 = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.First_inside_subquery_gets_client_evaluated() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o0].[CustomerID]
|
|
FROM [Orders] AS [o0]
|
|
WHERE ([o0].[CustomerID] = 'ALFKI') AND (@_outer_CustomerID = [o0].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_Count_with_predicate() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_method_string() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_alias_generation(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"SELECT [o#OrderDetails].[OrderID], [o#OrderDetails].[ProductID], [o#OrderDetails].[Discount], [o#OrderDetails].[Quantity], [o#OrderDetails].[UnitPrice]
|
|
FROM [Order Details] AS [o#OrderDetails]
|
|
INNER JOIN (
|
|
SELECT [o0].[OrderID]
|
|
FROM [Orders] AS [o0]
|
|
) AS [t] ON [o#OrderDetails].[OrderID] = [t].[OrderID]
|
|
ORDER BY [t].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_Where_OrderBy() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE ([o].[CustomerID] = 'ALFKI') OR ([c].[CustomerID] = 'ANATR')
|
|
ORDER BY [c].[City]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_Subquery_Single() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT TOP @__p_0 [od].[OrderID]
|
|
FROM [Order Details] AS [od]
|
|
ORDER BY [od].[ProductID], [od].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10285'
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_OrderID = [o].[OrderID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10294'
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_OrderID = [o].[OrderID]
|
|
ORDER BY [o].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_int_to_string() :
|
|
AssertSql(
|
|
@"SELECT Str([o].[OrderID]) AS [ShipName]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_closure() :
|
|
AssertSql(
|
|
@"@__city_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_project_filter2() :
|
|
AssertSql(
|
|
@"SELECT [c].[City]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_conditional_operator() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(
|
|
[c].[Region] IS NULL,
|
|
'ZZ',
|
|
[c].[Region]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_complex_predicate_not_matching_ins2() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI') AND [c].[CustomerID] NOT IN ('ALFKI', 'ABCDE')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Contains_Column() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (Instr([c].[ContactName], [c].[ContactName]) > 0) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Anonymous_member_distinct_where() :
|
|
AssertSql(
|
|
@"SELECT [t].[CustomerID]
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Contains_Identity() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (Instr([c].[ContactName], [c].[ContactName]) > 0) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_reversed() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE 'London' = [c].[City]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_concat_with_navigation2() :
|
|
AssertSql(
|
|
@"SELECT ([o#Customer].[City] + ' ') + [o#Customer].[City]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_Where_Count() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_EndsWith_Literal() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE RIGHT([c].[ContactName], LEN('b')) = 'b'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_alias_generation(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice], [o#Order].[OrderID], [o#Order].[CustomerID], [o#Order].[EmployeeID], [o#Order].[OrderDate]
|
|
FROM [Order Details] AS [o]
|
|
INNER JOIN [Orders] AS [o#Order] ON [o].[OrderID] = [o#Order].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_static_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__StaticFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__StaticFieldValue_0",
|
|
//
|
|
@"@__StaticFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__StaticFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested_negated3() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE NOT EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A')) AND (([c].[City] <> 'London') OR [c].[City] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_join_clause_with_order_by_and_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[City], [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
INNER JOIN [Orders] AS [o0] ON [c0].[CustomerID] = [o0].[CustomerID]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[City], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_join_clause_with_order_by_and_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[City], [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
INNER JOIN [Orders] AS [o0] ON [c0].[CustomerID] = [o0].[CustomerID]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[City], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_dependent_already_tracked_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_dependent_already_tracked_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_of_type_kiwi() :
|
|
AssertSql(
|
|
@"SELECT [k].[Species], [k].[CountryId], [k].[Discriminator], [k].[Name], [k].[EagleId], [k].[IsFlightless], [k].[FoundOn]
|
|
FROM [Animal] AS [k]
|
|
WHERE ([k].[Discriminator] = 'Kiwi') AND ([k].[CountryId] = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_of_type_bird_first() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [b].[Species], [b].[CountryId], [b].[Discriminator], [b].[Name], [b].[EagleId], [b].[IsFlightless], [b].[Group], [b].[FoundOn]
|
|
FROM [Animal] AS [b]
|
|
WHERE [b].[Discriminator] IN ('Kiwi', 'Eagle') AND ([b].[CountryId] = 1)
|
|
ORDER BY [b].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_is_kiwi_in_projection() :
|
|
AssertSql(
|
|
@"SELECT IIf(
|
|
[a].[Discriminator] = 'Kiwi',
|
|
True,
|
|
False
|
|
)
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle') AND ([a].[CountryId] = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_of_type_bird_with_projection() :
|
|
AssertSql(
|
|
@"SELECT [b].[EagleId]
|
|
FROM [Animal] AS [b]
|
|
WHERE [b].[Discriminator] IN ('Kiwi', 'Eagle') AND ([b].[CountryId] = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_is_kiwi() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE ([a].[Discriminator] IN ('Kiwi', 'Eagle') AND ([a].[CountryId] = 1)) AND ([a].[Discriminator] = 'Kiwi')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_of_type_bird_predicate() :
|
|
AssertSql(
|
|
@"SELECT [b].[Species], [b].[CountryId], [b].[Discriminator], [b].[Name], [b].[EagleId], [b].[IsFlightless], [b].[Group], [b].[FoundOn]
|
|
FROM [Animal] AS [b]
|
|
WHERE ([b].[Discriminator] IN ('Kiwi', 'Eagle') AND ([b].[CountryId] = 1)) AND ([b].[CountryId] = 1)
|
|
ORDER BY [b].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_of_type_animal() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle') AND ([a].[CountryId] = 1)
|
|
ORDER BY [a].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_of_type_bird() :
|
|
AssertSql(
|
|
@"SELECT [b].[Species], [b].[CountryId], [b].[Discriminator], [b].[Name], [b].[EagleId], [b].[IsFlightless], [b].[Group], [b].[FoundOn]
|
|
FROM [Animal] AS [b]
|
|
WHERE [b].[Discriminator] IN ('Kiwi', 'Eagle') AND ([b].[CountryId] = 1)
|
|
ORDER BY [b].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_is_kiwi_with_other_predicate() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE ([a].[Discriminator] IN ('Kiwi', 'Eagle') AND ([a].[CountryId] = 1)) AND (([a].[Discriminator] = 'Kiwi') AND ([a].[CountryId] = 1))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_list_inline() : line() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 6234
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.IsNullOrEmpty_in_predicate() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[Region] IS NULL OR ([c].[Region] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_dependent_already_tracked(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_dependent_already_tracked(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_join_clause_with_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
INNER JOIN [Orders] AS [o0] ON [c0].[CustomerID] = [o0].[CustomerID]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_join_clause_with_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
INNER JOIN [Orders] AS [o0] ON [c0].[CustomerID] = [o0].[CustomerID]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_closure_constant() :
|
|
AssertSql(
|
|
@"@__predicate_0='True'
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE @__predicate_0 = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_simple() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersJetTest.Compiled_query() :
|
|
AssertSql(
|
|
@"@__customerID='BERGS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = @__customerID",
|
|
//
|
|
@"@__customerID='BLAUS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = @__customerID");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_then_include_collection(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID], [c#Orders].[OrderID]",
|
|
//
|
|
@"SELECT [c#Orders#OrderDetails].[OrderID], [c#Orders#OrderDetails].[ProductID], [c#Orders#OrderDetails].[Discount], [c#Orders#OrderDetails].[Quantity], [c#Orders#OrderDetails].[UnitPrice]
|
|
FROM [Order Details] AS [c#Orders#OrderDetails]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c#Orders0].[OrderID], [t0].[CustomerID]
|
|
FROM [Orders] AS [c#Orders0]
|
|
INNER JOIN (
|
|
SELECT [c1].[CustomerID]
|
|
FROM [Customers] AS [c1]
|
|
) AS [t0] ON [c#Orders0].[CustomerID] = [t0].[CustomerID]
|
|
) AS [t1] ON [c#Orders#OrderDetails].[OrderID] = [t1].[OrderID]
|
|
ORDER BY [t1].[CustomerID], [t1].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_order_by_non_key_with_first_or_default(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CompanyName] DESC, [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID], [c0].[CompanyName]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CompanyName] DESC, [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CompanyName] DESC, [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_order_by_non_key_with_first_or_default(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CompanyName] DESC, [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID], [c0].[CompanyName]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CompanyName] DESC, [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CompanyName] DESC, [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_with_filter_reordered(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_of_type_kiwi_where_north_on_derived_property() :
|
|
AssertSql(
|
|
@"SELECT [x].[Species], [x].[CountryId], [x].[Discriminator], [x].[Name], [x].[EagleId], [x].[IsFlightless], [x].[FoundOn]
|
|
FROM [Animal] AS [x]
|
|
WHERE ([x].[Discriminator] = 'Kiwi') AND ([x].[FoundOn] = 0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_negated_twice() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_of_type_animal() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle')
|
|
ORDER BY [a].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_query_when_shared_column() :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [d].[Id], [d].[Discriminator], [d].[CaffeineGrams], [d].[CokeCO2], [d].[SugarGrams]
|
|
FROM [Drink] AS [d]
|
|
WHERE [d].[Discriminator] = 'Coke'",
|
|
//
|
|
@"SELECT TOP 2 [d].[Id], [d].[Discriminator], [d].[LiltCO2], [d].[SugarGrams]
|
|
FROM [Drink] AS [d]
|
|
WHERE [d].[Discriminator] = 'Lilt'",
|
|
//
|
|
@"SELECT TOP 2 [d].[Id], [d].[Discriminator], [d].[CaffeineGrams], [d].[HasMilk]
|
|
FROM [Drink] AS [d]
|
|
WHERE [d].[Discriminator] = 'Tea'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_of_type_kiwi_where_south_on_derived_property() :
|
|
AssertSql(
|
|
@"SELECT [x].[Species], [x].[CountryId], [x].[Discriminator], [x].[Name], [x].[EagleId], [x].[IsFlightless], [x].[FoundOn]
|
|
FROM [Animal] AS [x]
|
|
WHERE ([x].[Discriminator] = 'Kiwi') AND ([x].[FoundOn] = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_is_kiwi_with_other_predicate() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle') AND (([a].[Discriminator] = 'Kiwi') AND ([a].[CountryId] = 1))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersJetTest.Include_query_opt_out() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_of_type_bird_predicate() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle') AND ([a].[CountryId] = 1)
|
|
ORDER BY [a].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_is_kiwi_in_projection() :
|
|
AssertSql(
|
|
@"SELECT IIf(
|
|
[a].[Discriminator] = 'Kiwi',
|
|
True,
|
|
False
|
|
)
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Where_subquery_on_navigation_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [o4].[OrderID]
|
|
FROM [Orders] AS [o4]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o2].[OrderID]
|
|
FROM [Orders] AS [o2]
|
|
WHERE @_outer_CustomerID = [o2].[CustomerID]",
|
|
//
|
|
@"SELECT [o4].[OrderID]
|
|
FROM [Orders] AS [o4]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o2].[OrderID]
|
|
FROM [Orders] AS [o2]
|
|
WHERE @_outer_CustomerID = [o2].[CustomerID]",
|
|
//
|
|
@"SELECT [o4].[OrderID]
|
|
FROM [Orders] AS [o4]",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o2].[OrderID]
|
|
FROM [Orders] AS [o2]
|
|
WHERE @_outer_CustomerID = [o2].[CustomerID]",
|
|
//
|
|
@"SELECT [o4].[OrderID]
|
|
FROM [Orders] AS [o4]",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o2].[OrderID]
|
|
FROM [Orders] AS [o2]
|
|
WHERE @_outer_CustomerID = [o2].[CustomerID]");
|
|
|
|
Output truncated.
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_is_kiwi() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle') AND ([a].[Discriminator] = 'Kiwi')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_of_type_bird_first() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle')
|
|
ORDER BY [a].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Discriminator_used_when_projection_over_derived_type2() :
|
|
AssertSql(
|
|
@"SELECT [b].[IsFlightless], [b].[Discriminator]
|
|
FROM [Animal] AS [b]
|
|
WHERE [b].[Discriminator] IN ('Kiwi', 'Eagle')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Collection_select_nav_prop_first_or_default_then_nav_prop() :
|
|
AssertSql(
|
|
@"SELECT [e].[CustomerID]
|
|
FROM [Customers] AS [e]
|
|
WHERE [e].[CustomerID] LIKE 'A' + '%' AND (LEFT([e].[CustomerID], LEN('A')) = 'A')
|
|
ORDER BY [e].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [e#Customer].[CustomerID], [e#Customer].[Address], [e#Customer].[City], [e#Customer].[CompanyName], [e#Customer].[ContactName], [e#Customer].[ContactTitle], [e#Customer].[Country], [e#Customer].[Fax], [e#Customer].[Phone], [e#Customer].[PostalCode], [e#Customer].[Region]
|
|
FROM [Orders] AS [e0]
|
|
LEFT JOIN [Customers] AS [e#Customer] ON [e0].[CustomerID] = [e#Customer].[CustomerID]
|
|
WHERE [e0].[OrderID] IN (10643, 10692, 10702, 10835, 10952, 11011) AND (@_outer_CustomerID = [e0].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [e#Customer].[CustomerID], [e#Customer].[Address], [e#Customer].[City], [e#Customer].[CompanyName], [e#Customer].[ContactName], [e#Customer].[ContactTitle], [e#Customer].[Country], [e#Customer].[Fax], [e#Customer].[Phone], [e#Customer].[PostalCode], [e#Customer].[Region]
|
|
FROM [Orders] AS [e0]
|
|
LEFT JOIN [Customers] AS [e#Customer] ON [e0].[CustomerID] = [e#Customer].[CustomerID]
|
|
WHERE [e0].[OrderID] IN (10643, 10692, 10702, 10835, 10952, 11011) AND (@_outer_CustomerID = [e0].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [e#Customer].[CustomerID], [e#Customer].[Address], [e#Customer].[City], [e#Customer].[CompanyName], [e#Customer].[ContactName], [e#Customer].[ContactTitle], [e#Customer].[Country], [e#Customer].[Fax], [e#Customer].[Phone], [e#Customer].[PostalCode], [e#Customer].[Region]
|
|
FROM [Orders] AS [e0]
|
|
LEFT JOIN [Customers] AS [e#Customer] ON [e0].[CustomerID] = [e#Customer].[CustomerID]
|
|
WHERE [e0].[OrderID] IN (10643, 10692, 10702, 10835, 10952, 11011) AND (@_outer_CustomerID = [e0].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [e#Customer].[CustomerID], [e#Customer].[Address], [e#Customer].[City], [e#Customer].[CompanyName], [e#Customer].[ContactName], [e#Customer].[ContactTitle], [e#Customer].[Country], [e#Customer].[Fax], [e#Customer].[Phone], [e#Customer].[PostalCode], [e#Customer].[Region]
|
|
FROM [Orders] AS [e0]
|
|
LEFT JOIN [Customers] AS [e#Customer] ON [e0].[CustomerID] = [e#Customer].[CustomerID]
|
|
WHERE [e0].[OrderID] IN (10643, 10692, 10702, 10835, 10952, 11011) AND (@_outer_CustomerID = [e0].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Navigation_fk_based_inside_contains() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] IN ('ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Collection_where_nav_prop_all() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE NOT EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE ([c].[CustomerID] = [o].[CustomerID]) AND (([o].[CustomerID] <> 'ALFKI') OR [o].[CustomerID] IS NULL))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.GroupBy_on_nav_prop() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[City]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
ORDER BY [o#Customer].[City]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_correlated_filtered_collection_works_with_caching() :
|
|
AssertSql(
|
|
@"SELECT [t].[GearNickName]
|
|
FROM [CogTag] AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_shadow_subquery_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[Title] = (
|
|
SELECT TOP 1 [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
ORDER BY [e2].[Title]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_Where_Count() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_false() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.GroupJoin_with_nav_projected_in_subquery_when_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [od0].[OrderID], [od0].[ProductID], [od0].[Discount], [od0].[Quantity], [od0].[UnitPrice], [od#Product0].[ProductID], [od#Product0].[Discontinued], [od#Product0].[ProductName], [od#Product0].[UnitPrice], [od#Product0].[UnitsInStock]
|
|
FROM [Order Details] AS [od0]
|
|
INNER JOIN [Products] AS [od#Product0] ON [od0].[ProductID] = [od#Product0].[ProductID]",
|
|
//
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate], [o#Customer0].[CustomerID], [o#Customer0].[Address], [o#Customer0].[City], [o#Customer0].[CompanyName], [o#Customer0].[ContactName], [o#Customer0].[ContactTitle], [o#Customer0].[Country], [o#Customer0].[Fax], [o#Customer0].[Phone], [o#Customer0].[PostalCode], [o#Customer0].[Region]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_ternary_operation_with_has_value_not_null() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
[w].[AmmunitionType] IS NOT NULL AND ([w].[AmmunitionType] = 1),
|
|
'Yes',
|
|
'No'
|
|
) AS [IsCartidge]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[AmmunitionType] IS NOT NULL AND ([w].[AmmunitionType] = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_and_collection(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"SELECT [o#OrderDetails].[OrderID], [o#OrderDetails].[ProductID], [o#OrderDetails].[Discount], [o#OrderDetails].[Quantity], [o#OrderDetails].[UnitPrice]
|
|
FROM [Order Details] AS [o#OrderDetails]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [o0].[OrderID]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]
|
|
) AS [t] ON [o#OrderDetails].[OrderID] = [t].[OrderID]
|
|
ORDER BY [t].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_inverted_boolean() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
[w].[IsAutomatic] = False,
|
|
True,
|
|
False
|
|
) AS [Manual]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[IsAutomatic] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_member_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] AS [Property]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[Property] LIKE 'A' + '%' AND (LEFT([t].[Property], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Include_on_GroupJoin_SelectMany_DefaultIfEmpty_with_complex_projection_result() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank], [t].[Nickname], [t].[SquadId], [t].[AssignedCityName], [t].[CityOrBirthName], [t].[Discriminator], [t].[FullName], [t].[HasSoulPatch], [t].[LeaderNickname], [t].[LeaderSquadId], [t].[Rank]
|
|
FROM [Gear] AS [g]
|
|
LEFT JOIN (
|
|
SELECT [g2].*
|
|
FROM [Gear] AS [g2]
|
|
WHERE [g2].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t] ON [g].[LeaderNickname] = [t].[Nickname]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear')
|
|
ORDER BY [g].[FullName], [t].[FullName]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Sum_with_optional_navigation_is_translated_to_sql() :
|
|
AssertSql(
|
|
@"SELECT SUM([g].[SquadId])
|
|
FROM [Gear] AS [g]
|
|
LEFT JOIN [CogTag] AS [g#Tag] ON ([g].[Nickname] = [g#Tag].[GearNickName]) AND ([g].[SquadId] = [g#Tag].[GearSquadId])
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g#Tag].[Note] <> 'Foo') OR [g#Tag].[Note] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Navigation() :
|
|
AssertSql(
|
|
@"SELECT [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_and_collection(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"SELECT [o#OrderDetails].[OrderID], [o#OrderDetails].[ProductID], [o#OrderDetails].[Discount], [o#OrderDetails].[Quantity], [o#OrderDetails].[UnitPrice]
|
|
FROM [Order Details] AS [o#OrderDetails]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [o0].[OrderID]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]
|
|
) AS [t] ON [o#OrderDetails].[OrderID] = [t].[OrderID]
|
|
ORDER BY [t].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_when_groupby(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[City], [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[City], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Join_with_nav_in_orderby_in_subquery_when_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [od0].[OrderID], [od0].[ProductID], [od0].[Discount], [od0].[Quantity], [od0].[UnitPrice], [od#Product0].[ProductID], [od#Product0].[Discontinued], [od#Product0].[ProductName], [od#Product0].[UnitPrice], [od#Product0].[UnitsInStock]
|
|
FROM [Order Details] AS [od0]
|
|
INNER JOIN [Products] AS [od#Product0] ON [od0].[ProductID] = [od#Product0].[ProductID]",
|
|
//
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate], [o#Customer0].[CustomerID], [o#Customer0].[Address], [o#Customer0].[City], [o#Customer0].[CompanyName], [o#Customer0].[ContactName], [o#Customer0].[ContactTitle], [o#Customer0].[Country], [o#Customer0].[Fax], [o#Customer0].[Phone], [o#Customer0].[PostalCode], [o#Customer0].[Region]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_last_no_orderby(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID] DESC",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID] DESC
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE [o#Customer].[City] = 'Seattle'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_EndsWith_Identity() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (RIGHT([c].[ContactName], LEN([c].[ContactName])) = [c].[ContactName]) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_de_morgan_and_optimizated() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ([p].[Discontinued] = False) OR ([p].[ProductID] >= 20)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_comparison_with_null() :
|
|
AssertSql(
|
|
@"@__ammunitionType_0='Cartridge'
|
|
@__ammunitionType_1='Cartridge'
|
|
|
|
SELECT [w].[Id], IIf(
|
|
[w].[AmmunitionType] = @__ammunitionType_1,
|
|
True,
|
|
False
|
|
) AS [Cartidge]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[AmmunitionType] = @__ammunitionType_0",
|
|
//
|
|
@"SELECT [w].[Id], IIf(
|
|
[w].[AmmunitionType] IS NULL,
|
|
True,
|
|
False
|
|
) AS [Cartidge]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[AmmunitionType] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Local_array() :
|
|
AssertSql(
|
|
@"@__get_Item_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = @__get_Item_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Entity_equality_empty() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[Nickname] IS NULL AND ([g].[SquadId] = 0))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_Customers_Orders_Skip_Take() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
@__p_1='5'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [c].[ContactName], [o].[OrderID]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_principal_already_tracked_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_collection_FirstOrDefault_project_entity() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Singleton_Navigation_With_Member_Access() :
|
|
AssertSql(
|
|
@"SELECT [o#Customer].[City] AS [B]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE ([o#Customer].[City] = 'Seattle') AND (([o#Customer].[Phone] <> '555 555 5555') OR [o#Customer].[Phone] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_dependent_already_tracked(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_dependent_already_tracked(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_EndsWith_MethodCall() :
|
|
AssertSql(
|
|
@"@__LocalMethod2_0='m' (Nullable = false) (Size = 1)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (RIGHT([c].[ContactName], LEN(@__LocalMethod2_0)) = @__LocalMethod2_0) OR (@__LocalMethod2_0 = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.GroupJoin_with_nav_in_predicate_in_subquery_when_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [od0].[OrderID], [od0].[ProductID], [od0].[Discount], [od0].[Quantity], [od0].[UnitPrice], [od#Product0].[ProductID], [od#Product0].[Discontinued], [od#Product0].[ProductName], [od#Product0].[UnitPrice], [od#Product0].[UnitsInStock]
|
|
FROM [Order Details] AS [od0]
|
|
INNER JOIN [Products] AS [od#Product0] ON [od0].[ProductID] = [od#Product0].[ProductID]",
|
|
//
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate], [o#Customer0].[CustomerID], [o#Customer0].[Address], [o#Customer0].[City], [o#Customer0].[CompanyName], [o#Customer0].[ContactName], [o#Customer0].[ContactTitle], [o#Customer0].[Country], [o#Customer0].[Fax], [o#Customer0].[Phone], [o#Customer0].[PostalCode], [o#Customer0].[Region]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Project_single_entity_value_subquery_works() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_0",
|
|
//
|
|
@"@__city_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.GroupJoin_with_nav_in_orderby_in_subquery_when_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [od0].[OrderID], [od0].[ProductID], [od0].[Discount], [od0].[Quantity], [od0].[UnitPrice], [od#Product0].[ProductID], [od#Product0].[Discontinued], [od#Product0].[ProductName], [od#Product0].[UnitPrice], [od#Product0].[UnitsInStock]
|
|
FROM [Order Details] AS [od0]
|
|
INNER JOIN [Products] AS [od#Product0] ON [od0].[ProductID] = [od#Product0].[ProductID]",
|
|
//
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate], [o#Customer0].[CustomerID], [o#Customer0].[Address], [o#Customer0].[City], [o#Customer0].[CompanyName], [o#Customer0].[ContactName], [o#Customer0].[ContactTitle], [o#Customer0].[Country], [o#Customer0].[Fax], [o#Customer0].[Phone], [o#Customer0].[PostalCode], [o#Customer0].[Region]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Take_Select_Navigation() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_expression_invoke() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Anonymous_member_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[CustomerID] LIKE 'A' + '%' AND (LEFT([t].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_Customers_Orders_Projection_With_String_Concat_Skip_Take() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
@__p_1='5'
|
|
|
|
SELECT TOP @__p_1+@__p_0 ([c].[ContactName] + ' ') + [c].[ContactTitle] AS [Contact], [o].[OrderID]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_compared_to_binary_expression() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = IIf(
|
|
[p].[ProductID] > 50,
|
|
True,
|
|
False
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Join_with_nav_in_predicate_in_subquery_when_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [od0].[OrderID], [od0].[ProductID], [od0].[Discount], [od0].[Quantity], [od0].[UnitPrice], [od#Product0].[ProductID], [od#Product0].[Discontinued], [od#Product0].[ProductName], [od#Product0].[UnitPrice], [od#Product0].[UnitsInStock]
|
|
FROM [Order Details] AS [od0]
|
|
INNER JOIN [Products] AS [od#Product0] ON [od0].[ProductID] = [od#Product0].[ProductID]",
|
|
//
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate], [o#Customer0].[CustomerID], [o#Customer0].[Address], [o#Customer0].[City], [o#Customer0].[CompanyName], [o#Customer0].[ContactName], [o#Customer0].[ContactTitle], [o#Customer0].[Country], [o#Customer0].[Fax], [o#Customer0].[Phone], [o#Customer0].[PostalCode], [o#Customer0].[Region]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Null_conditional_simple() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Navigation_inside_contains() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE [o#Customer].[City] IN ('Novigrad', 'Seattle')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_collection_FirstOrDefault_project_anonymous_type() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[CustomerID], [o].[OrderID]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[CustomerID], [o].[OrderID]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation_Multiple_Access() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE ([o#Customer].[City] = 'Seattle') AND (([o#Customer].[Phone] <> '555 555 5555') OR [o#Customer].[Phone] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_subquery_and_local_array_closure() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Customers] AS [c1]
|
|
WHERE [c1].[City] IN ('London', 'Buenos Aires') AND ([c1].[CustomerID] = [c].[CustomerID]))",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Customers] AS [c1]
|
|
WHERE [c1].[City] IN ('London') AND ([c1].[CustomerID] = [c].[CustomerID]))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_with_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_with_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_with_skip(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='80'
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName], [c].[CustomerID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_with_skip(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='80'
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName], [c].[CustomerID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_on_mismatched_types_nullable_int_long() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True",
|
|
//
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Collection_select_nav_prop_all_client() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BERGS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BLAUS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BLONP' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BOLID' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]");
|
|
|
|
Output truncated.
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation_Null_Deep() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
LEFT JOIN [Employees] AS [e#Manager] ON [e].[ReportsTo] = [e#Manager].[EmployeeID]
|
|
WHERE [e#Manager].[ReportsTo] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Single_Predicate() :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_simple_parameterized() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_multi_level_reference_and_collection_predicate(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE [o].[OrderID] = 10248
|
|
ORDER BY [o#Customer].[CustomerID]",
|
|
//
|
|
@"SELECT [o#Customer#Orders].[OrderID], [o#Customer#Orders].[CustomerID], [o#Customer#Orders].[EmployeeID], [o#Customer#Orders].[OrderDate]
|
|
FROM [Orders] AS [o#Customer#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [t].*
|
|
FROM (
|
|
SELECT TOP 1 [o#Customer0].[CustomerID]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]
|
|
WHERE [o0].[OrderID] = 10248
|
|
ORDER BY [o#Customer0].[CustomerID]
|
|
) AS [t]
|
|
) AS [t0] ON [o#Customer#Orders].[CustomerID] = [t0].[CustomerID]
|
|
ORDER BY [t0].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_complex_predicate_or() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI', 'ALFKI', 'ABCDE')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_with_multiple_conditions_still_uses_exists() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[City] = 'London') AND EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[EmployeeID] = 1) AND ([c].[CustomerID] = [o].[CustomerID]))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_other_to_string() :
|
|
AssertSql(
|
|
@"SELECT Str([o].[OrderDate]) AS [ShipName]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_last(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CompanyName] DESC, [c].[CustomerID] DESC",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID], [c0].[CompanyName]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CompanyName] DESC, [c0].[CustomerID] DESC
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CompanyName] DESC, [t].[CustomerID] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_last(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CompanyName] DESC, [c].[CustomerID] DESC",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID], [c0].[CompanyName]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CompanyName] DESC, [c0].[CustomerID] DESC
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CompanyName] DESC, [t].[CustomerID] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_where_skip_take_projection(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='1'
|
|
@__p_1='2'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [od#Order].[CustomerID]
|
|
FROM [Order Details] AS [od]
|
|
INNER JOIN [Orders] AS [od#Order] ON [od].[OrderID] = [od#Order].[OrderID]
|
|
WHERE [od].[Quantity] = 10
|
|
ORDER BY [od].[OrderID], [od].[ProductID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_where_skip_take_projection(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='1'
|
|
@__p_1='2'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [od#Order].[CustomerID]
|
|
FROM [Order Details] AS [od]
|
|
INNER JOIN [Orders] AS [od#Order] ON [od].[OrderID] = [od#Order].[OrderID]
|
|
WHERE [od].[Quantity] = 10
|
|
ORDER BY [od].[OrderID], [od].[ProductID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_join_select() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_sin() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (SIN([od].[Discount]) > 0E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_skip_take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
@__p_1='8'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactTitle], [c].[ContactName]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_negated_boolean_expression_compared_to_another_negated_boolean_expression() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE IIf(
|
|
[p].[ProductID] > 50,
|
|
True,
|
|
False
|
|
) = IIf(
|
|
[p].[ProductID] > 20,
|
|
True,
|
|
False
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_StartsWith_Identity() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[ContactName] LIKE [c].[ContactName] + '%' AND (LEFT([c].[ContactName], LEN([c].[ContactName])) = [c].[ContactName])) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OfType_Select() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [o#Customer].[City]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
ORDER BY [o].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_complex_distinct_where() :
|
|
AssertSql(
|
|
@"SELECT [t].[Property]
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] + [c].[City] AS [Property]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[Property] = 'ALFKIBerlin'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_true() :
|
|
AssertSql(
|
|
@"@__flag_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ((@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)) OR ((@__flag_0 <> True) AND ([p].[UnitsInStock] < 20))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_complex_predicate_not_matching_ins1() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ALFKI', 'ABCDE') OR [c].[CustomerID] NOT IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_client_side_negated() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_multi_level() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 3 [o].[OrderDate] AS [Date]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND (@_outer_CustomerID = [o].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 3 [o].[OrderDate] AS [Date]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND (@_outer_CustomerID = [o].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 3 [o].[OrderDate] AS [Date]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND (@_outer_CustomerID = [o].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 3 [o].[OrderDate] AS [Date]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND (@_outer_CustomerID = [o].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.IsNullOrEmpty_in_projection() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID] AS [Id], IIf(
|
|
[c].[Region] IS NULL OR ([c].[Region] = ''),
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_shadow_projection() :
|
|
AssertSql(
|
|
@"SELECT [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[Title] = 'Sales Representative'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_closure_via_query_cache_nullable_type() :
|
|
AssertSql(
|
|
@"@__reportsTo_0='2'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__reportsTo_0",
|
|
//
|
|
@"@__reportsTo_0='5'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__reportsTo_0",
|
|
//
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_nested_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_Nested_InstanceFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstanceFieldValue_0",
|
|
//
|
|
@"@__city_Nested_InstanceFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstanceFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_DefaultIfEmpty_Where() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Customers] AS [c]
|
|
LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [o].[OrderID] IS NOT NULL AND ([o].[CustomerID] = 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_constant_is_null() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested_negated() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE NOT EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Last() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_method_call_nullable_type_reverse_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_NullableInt_0='1'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[EmployeeID] > @__city_NullableInt_0",
|
|
//
|
|
@"@__city_NullableInt_0='5'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[EmployeeID] > @__city_NullableInt_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_subquery_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__customerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[CustomerID] = @__customerID_0) AND ([o].[CustomerID] = [c].[CustomerID]))",
|
|
//
|
|
@"@__customerID_0='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[CustomerID] = @__customerID_0) AND ([o].[CustomerID] = [c].[CustomerID]))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_exp() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (EXP([od].[Discount]) > 1E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Skip_Take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
@__p_1='10'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_de_morgan_or_optimizated() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ([p].[Discontinued] = False) AND ([p].[ProductID] >= 20)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title]
|
|
FROM [Employees] AS [e1]
|
|
WHERE [e1].[FirstName] = (
|
|
SELECT TOP 1 [e].[FirstName]
|
|
FROM [Employees] AS [e]
|
|
ORDER BY [e].[EmployeeID]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_scalar_primitive_after_take() :
|
|
AssertSql(
|
|
@"@__p_0='9'
|
|
|
|
SELECT TOP @__p_0 [e].[EmployeeID]
|
|
FROM [Employees] AS [e]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.FirstOrDefault_inside_subquery_gets_server_evaluated() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[CustomerID] = 'ALFKI') AND ((
|
|
SELECT TOP 1 [o].[CustomerID]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[CustomerID] = 'ALFKI') AND ([c].[CustomerID] = [o].[CustomerID])
|
|
) = 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.IsNullOrWhiteSpace_in_predicate() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[Region] IS NULL OR (LTRIM(RTRIM([c].[Region])) = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_array_closure() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI')",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Query_expression_with_to_string_and_contains() :
|
|
AssertSql(
|
|
@"SELECT [o].[CustomerID]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL AND (Instr(Str([o].[EmployeeID]), '10') > 0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_simple_projection() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[City]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_static_property_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__StaticPropertyValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__StaticPropertyValue_0",
|
|
//
|
|
@"@__StaticPropertyValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__StaticPropertyValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_subquery_on_bool() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE 'Chai' IN (
|
|
SELECT [p2].[ProductName]
|
|
FROM [Products] AS [p2]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_client_deep_inside_predicate_and_server_top_level() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <> 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_false() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] NOT IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_parameter_compared_to_binary_expression() :
|
|
AssertSql(
|
|
@"@__prm_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE IIf(
|
|
[p].[ProductID] > 50,
|
|
True,
|
|
False
|
|
) <> @__prm_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Last_when_no_order_by() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_anonymous_conditional_expression() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], IIf(
|
|
[p].[UnitsInStock] > 0,
|
|
True,
|
|
False
|
|
) AS [IsAvailable]
|
|
FROM [Products] AS [p]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_not_bool_member_compared_to_binary_expression() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] <> IIf(
|
|
[p].[ProductID] > 50,
|
|
True,
|
|
False
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_orderby_join_select() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] <> 'ALFKI'
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_no_elements_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title]
|
|
FROM [Employees] AS [e1]
|
|
WHERE (
|
|
SELECT TOP 1 [e2].[EmployeeID]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = 42
|
|
) = 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_cos() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (COS([od].[Discount]) > 0E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested2() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (([c].[City] <> 'London') OR [c].[City] IS NULL) AND EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Count_with_predicate() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupBy_anonymous_with_where() :
|
|
AssertSql(
|
|
@"SELECT [c].[City], [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[Country] IN ('Argentina', 'Austria', 'Brazil', 'France', 'Germany', 'USA')
|
|
ORDER BY [c].[City]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_list_inline_closure_mix() : line_closure_mix() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 6244
|
|
AssertSql(
|
|
@"@__id_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', @__id_0)",
|
|
//
|
|
@"@__id_0='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', @__id_0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_closure_via_query_cache_nullable_type_reverse() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] IS NULL",
|
|
//
|
|
@"@__reportsTo_0='5'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__reportsTo_0",
|
|
//
|
|
@"@__reportsTo_0='2'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__reportsTo_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_property_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_InstancePropertyValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstancePropertyValue_0",
|
|
//
|
|
@"@__city_InstancePropertyValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstancePropertyValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_null_is_not_null() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_Where_Count_with_predicate() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] > 10) AND (([o].[CustomerID] <> 'ALFKI') OR [o].[CustomerID] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.IsNullOrEmpty_negated_in_projection() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID] AS [Id], IIf(
|
|
[c].[Region] IS NOT NULL AND ([c].[Region] <> ''),
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OfType_Select_OfType_Select() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [o#Customer].[City]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
ORDER BY [o].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_Where_Subquery_Deep_Single() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE [od].[OrderID] = 10344",
|
|
//
|
|
@"@_outer_OrderID='10344'
|
|
|
|
SELECT TOP 2 [o0].[CustomerID]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_OrderID = [o0].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID1='WHITC' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 2 [c2].[City]
|
|
FROM [Customers] AS [c2]
|
|
WHERE @_outer_CustomerID1 = [c2].[CustomerID]",
|
|
//
|
|
@"@_outer_OrderID='10344'
|
|
|
|
SELECT TOP 2 [o0].[CustomerID]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_OrderID = [o0].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID1='WHITC' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 2 [c2].[City]
|
|
FROM [Customers] AS [c2]
|
|
WHERE @_outer_CustomerID1 = [c2].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_nested_property_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_Nested_InstancePropertyValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstancePropertyValue_0",
|
|
//
|
|
@"@__city_Nested_InstancePropertyValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstancePropertyValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_and_parameter_compared_to_binary_expression_nested() :
|
|
AssertSql(
|
|
@"@__prm_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = IIf(
|
|
IIf(
|
|
[p].[ProductID] > 50,
|
|
True,
|
|
False
|
|
) <> @__prm_0,
|
|
True,
|
|
False
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_Last() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Contains_MethodCall() :
|
|
AssertSql(
|
|
@"@__LocalMethod1_0='M' (Nullable = false) (Size = 1)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (Instr([c].[ContactName], @__LocalMethod1_0) > 0) OR (@__LocalMethod1_0 = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_compare_with_parameter() :
|
|
AssertSql(
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] > @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] < @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] >= @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] >= @__customer_CustomerID_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Anonymous_complex_distinct_where() :
|
|
AssertSql(
|
|
@"SELECT [t].[A]
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] + [c].[City] AS [A]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[A] = 'ALFKIBerlin'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_equals_constant() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_InstanceFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstanceFieldValue_0",
|
|
//
|
|
@"@__city_InstanceFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstanceFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_on_matched_nullable_int_types() :
|
|
AssertSql(
|
|
@"@__nullableIntPrm_0='2'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE @__nullableIntPrm_0 = [e].[ReportsTo]",
|
|
//
|
|
@"@__nullableIntPrm_0='2'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__nullableIntPrm_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_OrderBy_Count() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_with_false_as_result_false() :
|
|
AssertSql(
|
|
@"@__flag_0='False'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE (@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Compare_multi_predicate() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] >= 'ALFKI' AND [c].[CustomerID] < 'CACTU'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[ContactTitle] = 'Owner' AND [c].[Country] <> 'USA'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_complex_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] + [c].[City] AS [Property]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[Property] LIKE 'A' + '%' AND (LEFT([t].[Property], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_with_false_as_result_true() :
|
|
AssertSql(
|
|
@"@__flag_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE (@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_new_instance_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__InstanceFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__InstanceFieldValue_0",
|
|
//
|
|
@"@__InstanceFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__InstanceFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_compare_null() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] IS NULL AND ([c].[Country] = 'UK')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Entity_equality_local() :
|
|
AssertSql(
|
|
@"@__local_0_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = @__local_0_CustomerID");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Queryable_simple_anonymous_projection_subquery() :
|
|
AssertSql(
|
|
@"@__p_0='91'
|
|
|
|
SELECT TOP @__p_0 [c].[City]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_false() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = False");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_comparison_operator() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(
|
|
[c].[Region] = 'ASK',
|
|
True,
|
|
False
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_multiple_elements_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title]
|
|
FROM [Employees] AS [e1]
|
|
WHERE (
|
|
SELECT TOP 1 [e2].[EmployeeID]
|
|
FROM [Employees] AS [e2]
|
|
WHERE ([e2].[EmployeeID] <> [e1].[ReportsTo]) OR [e1].[ReportsTo] IS NULL
|
|
) = 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_using_object_overload_on_mismatched_types() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_complex_predicate_and() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ALFKI', 'ABCDE') AND [c].[CustomerID] IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_shadow() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_on_mismatched_types_nullable_long_nullable_int() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True",
|
|
//
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_StartsWith_Literal() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[ContactName] LIKE 'M' + '%' AND (LEFT([c].[ContactName], LEN('M')) = 'M')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_one_element_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title]
|
|
FROM [Employees] AS [e1]
|
|
WHERE (
|
|
SELECT TOP 1 [e2].[EmployeeID]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = [e1].[ReportsTo]
|
|
) = 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_false_shadow() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = False");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_tan() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (TAN([od].[Discount]) > 0E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_array_inline() : line() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 6214
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_conditional_operator_where_condition_null() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(
|
|
False = True,
|
|
'ZZ',
|
|
[c].[City]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Last_Predicate() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Entity_equality_local_inline() : line() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 175
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ANATR'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_Where() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Environment_newline_is_funcletized() : line_is_funcletized() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 6640
|
|
AssertSql(
|
|
@"@__NewLine_0='
|
|
' (Nullable = false) (Size = 2)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (Instr([c].[CustomerID], @__NewLine_0) > 0) OR (@__NewLine_0 = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Compare_simple_one() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] > 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] < 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] >= 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] >= 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.LastOrDefault_Predicate() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_complex_negated_expression_optimized() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE (([p].[Discontinued] = False) AND ([p].[ProductID] < 60)) AND ([p].[ProductID] > 30)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_list_closure() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_alias_generation(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"SELECT [o#OrderDetails].[OrderID], [o#OrderDetails].[ProductID], [o#OrderDetails].[Discount], [o#OrderDetails].[Quantity], [o#OrderDetails].[UnitPrice]
|
|
FROM [Order Details] AS [o#OrderDetails]
|
|
INNER JOIN (
|
|
SELECT [o0].[OrderID]
|
|
FROM [Orders] AS [o0]
|
|
) AS [t] ON [o#OrderDetails].[OrderID] = [t].[OrderID]
|
|
ORDER BY [t].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_alias_generation(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"SELECT [o#OrderDetails].[OrderID], [o#OrderDetails].[ProductID], [o#OrderDetails].[Discount], [o#OrderDetails].[Quantity], [o#OrderDetails].[UnitPrice]
|
|
FROM [Order Details] AS [o#OrderDetails]
|
|
INNER JOIN (
|
|
SELECT [o0].[OrderID]
|
|
FROM [Orders] AS [o0]
|
|
) AS [t] ON [o#OrderDetails].[OrderID] = [t].[OrderID]
|
|
ORDER BY [t].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Discriminator_used_when_projection_over_of_type() :
|
|
AssertSql(
|
|
@"SELECT [k].[FoundOn]
|
|
FROM [Animal] AS [k]
|
|
WHERE [k].[Discriminator] = 'Kiwi'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_query_all_types_when_shared_column() :
|
|
AssertSql(
|
|
@"SELECT [d].[Id], [d].[Discriminator], [d].[CaffeineGrams], [d].[CokeCO2], [d].[SugarGrams], [d].[LiltCO2], [d].[HasMilk]
|
|
FROM [Drink] AS [d]
|
|
WHERE [d].[Discriminator] IN ('Tea', 'Lilt', 'Coke', 'Drink')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_of_type_kiwi_where_north_on_derived_property() :
|
|
AssertSql(
|
|
@"SELECT [x].[Species], [x].[CountryId], [x].[Discriminator], [x].[Name], [x].[EagleId], [x].[IsFlightless], [x].[FoundOn]
|
|
FROM [Animal] AS [x]
|
|
WHERE ([x].[Discriminator] = 'Kiwi') AND ([x].[FoundOn] = 0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_query_all_birds() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle')
|
|
ORDER BY [a].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_include_prey() :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [e].[Species], [e].[CountryId], [e].[Discriminator], [e].[Name], [e].[EagleId], [e].[IsFlightless], [e].[Group]
|
|
FROM [Animal] AS [e]
|
|
WHERE [e].[Discriminator] = 'Eagle'
|
|
ORDER BY [e].[Species]",
|
|
//
|
|
@"SELECT [e#Prey].[Species], [e#Prey].[CountryId], [e#Prey].[Discriminator], [e#Prey].[Name], [e#Prey].[EagleId], [e#Prey].[IsFlightless], [e#Prey].[Group], [e#Prey].[FoundOn]
|
|
FROM [Animal] AS [e#Prey]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [e0].[Species]
|
|
FROM [Animal] AS [e0]
|
|
WHERE [e0].[Discriminator] = 'Eagle'
|
|
ORDER BY [e0].[Species]
|
|
) AS [t] ON [e#Prey].[EagleId] = [t].[Species]
|
|
WHERE [e#Prey].[Discriminator] IN ('Kiwi', 'Eagle')
|
|
ORDER BY [t].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Discriminator_used_when_projection_over_derived_type() :
|
|
AssertSql(
|
|
@"SELECT [k].[FoundOn]
|
|
FROM [Animal] AS [k]
|
|
WHERE [k].[Discriminator] = 'Kiwi'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_of_type_animal() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle')
|
|
ORDER BY [a].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_of_type_bird() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle')
|
|
ORDER BY [a].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_query_when_shared_column() :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [d].[Id], [d].[Discriminator], [d].[CaffeineGrams], [d].[CokeCO2], [d].[SugarGrams]
|
|
FROM [Drink] AS [d]
|
|
WHERE [d].[Discriminator] = 'Coke'",
|
|
//
|
|
@"SELECT TOP 2 [d].[Id], [d].[Discriminator], [d].[LiltCO2], [d].[SugarGrams]
|
|
FROM [Drink] AS [d]
|
|
WHERE [d].[Discriminator] = 'Lilt'",
|
|
//
|
|
@"SELECT TOP 2 [d].[Id], [d].[Discriminator], [d].[CaffeineGrams], [d].[HasMilk]
|
|
FROM [Drink] AS [d]
|
|
WHERE [d].[Discriminator] = 'Tea'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_of_type_kiwi_where_south_on_derived_property() :
|
|
AssertSql(
|
|
@"SELECT [x].[Species], [x].[CountryId], [x].[Discriminator], [x].[Name], [x].[EagleId], [x].[IsFlightless], [x].[FoundOn]
|
|
FROM [Animal] AS [x]
|
|
WHERE ([x].[Discriminator] = 'Kiwi') AND ([x].[FoundOn] = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_is_kiwi_with_other_predicate() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle') AND (([a].[Discriminator] = 'Kiwi') AND ([a].[CountryId] = 1))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_of_type_bird_with_projection() :
|
|
AssertSql(
|
|
@"SELECT [b].[EagleId]
|
|
FROM [Animal] AS [b]
|
|
WHERE [b].[Discriminator] IN ('Kiwi', 'Eagle')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_query_just_roses() :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [p].[Species], [p].[CountryId], [p].[Genus], [p].[Name], [p].[HasThorns]
|
|
FROM [Plant] AS [p]
|
|
WHERE [p].[Genus] = 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_alias_generation(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice], [o#Order].[OrderID], [o#Order].[CustomerID], [o#Order].[EmployeeID], [o#Order].[OrderDate]
|
|
FROM [Order Details] AS [o]
|
|
INNER JOIN [Orders] AS [o#Order] ON [o].[OrderID] = [o#Order].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_query_just_kiwis() :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] = 'Kiwi'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Compare_simple_zero() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <> 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] > 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] > 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_of_type_bird_first() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle')
|
|
ORDER BY [a].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Discriminator_used_when_projection_over_derived_type2() :
|
|
AssertSql(
|
|
@"SELECT [b].[IsFlightless], [b].[Discriminator]
|
|
FROM [Animal] AS [b]
|
|
WHERE [b].[Discriminator] IN ('Kiwi', 'Eagle')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_query_all_animals() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle')
|
|
ORDER BY [a].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_Where_Count_with_predicate_client_eval_mixed() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[CustomerID] <> 'ALFKI') OR [o].[CustomerID] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_method_call_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__GetCity_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__GetCity_0",
|
|
//
|
|
@"@__GetCity_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__GetCity_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_join_clause_with_order_by_and_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[City], [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
INNER JOIN [Orders] AS [o0] ON [c0].[CustomerID] = [o0].[CustomerID]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[City], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_dependent_already_tracked_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_dependent_already_tracked_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Where_subquery_on_navigation_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [o4].[OrderID]
|
|
FROM [Orders] AS [o4]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o2].[OrderID]
|
|
FROM [Orders] AS [o2]
|
|
WHERE @_outer_CustomerID = [o2].[CustomerID]",
|
|
//
|
|
@"SELECT [o4].[OrderID]
|
|
FROM [Orders] AS [o4]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o2].[OrderID]
|
|
FROM [Orders] AS [o2]
|
|
WHERE @_outer_CustomerID = [o2].[CustomerID]",
|
|
//
|
|
@"SELECT [o4].[OrderID]
|
|
FROM [Orders] AS [o4]",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o2].[OrderID]
|
|
FROM [Orders] AS [o2]
|
|
WHERE @_outer_CustomerID = [o2].[CustomerID]",
|
|
//
|
|
@"SELECT [o4].[OrderID]
|
|
FROM [Orders] AS [o4]",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o2].[OrderID]
|
|
FROM [Orders] AS [o2]
|
|
WHERE @_outer_CustomerID = [o2].[CustomerID]");
|
|
|
|
Output truncated.
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Navigations() :
|
|
AssertSql(
|
|
@"SELECT [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Collection_select_nav_prop_first_or_default_then_nav_prop() :
|
|
AssertSql(
|
|
@"SELECT [e].[CustomerID]
|
|
FROM [Customers] AS [e]
|
|
WHERE [e].[CustomerID] LIKE 'A' + '%' AND (LEFT([e].[CustomerID], LEN('A')) = 'A')
|
|
ORDER BY [e].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [e#Customer].[CustomerID], [e#Customer].[Address], [e#Customer].[City], [e#Customer].[CompanyName], [e#Customer].[ContactName], [e#Customer].[ContactTitle], [e#Customer].[Country], [e#Customer].[Fax], [e#Customer].[Phone], [e#Customer].[PostalCode], [e#Customer].[Region]
|
|
FROM [Orders] AS [e0]
|
|
LEFT JOIN [Customers] AS [e#Customer] ON [e0].[CustomerID] = [e#Customer].[CustomerID]
|
|
WHERE [e0].[OrderID] IN (10643, 10692, 10702, 10835, 10952, 11011) AND (@_outer_CustomerID = [e0].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [e#Customer].[CustomerID], [e#Customer].[Address], [e#Customer].[City], [e#Customer].[CompanyName], [e#Customer].[ContactName], [e#Customer].[ContactTitle], [e#Customer].[Country], [e#Customer].[Fax], [e#Customer].[Phone], [e#Customer].[PostalCode], [e#Customer].[Region]
|
|
FROM [Orders] AS [e0]
|
|
LEFT JOIN [Customers] AS [e#Customer] ON [e0].[CustomerID] = [e#Customer].[CustomerID]
|
|
WHERE [e0].[OrderID] IN (10643, 10692, 10702, 10835, 10952, 11011) AND (@_outer_CustomerID = [e0].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [e#Customer].[CustomerID], [e#Customer].[Address], [e#Customer].[City], [e#Customer].[CompanyName], [e#Customer].[ContactName], [e#Customer].[ContactTitle], [e#Customer].[Country], [e#Customer].[Fax], [e#Customer].[Phone], [e#Customer].[PostalCode], [e#Customer].[Region]
|
|
FROM [Orders] AS [e0]
|
|
LEFT JOIN [Customers] AS [e#Customer] ON [e0].[CustomerID] = [e#Customer].[CustomerID]
|
|
WHERE [e0].[OrderID] IN (10643, 10692, 10702, 10835, 10952, 11011) AND (@_outer_CustomerID = [e0].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [e#Customer].[CustomerID], [e#Customer].[Address], [e#Customer].[City], [e#Customer].[CompanyName], [e#Customer].[ContactName], [e#Customer].[ContactTitle], [e#Customer].[Country], [e#Customer].[Fax], [e#Customer].[Phone], [e#Customer].[PostalCode], [e#Customer].[Region]
|
|
FROM [Orders] AS [e0]
|
|
LEFT JOIN [Customers] AS [e#Customer] ON [e0].[CustomerID] = [e#Customer].[CustomerID]
|
|
WHERE [e0].[OrderID] IN (10643, 10692, 10702, 10835, 10952, 11011) AND (@_outer_CustomerID = [e0].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Navigation_fk_based_inside_contains() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] IN ('ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_client_and_server_top_level() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <> 'AROUT'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_shadow() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[Title] = 'Sales Representative'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_project_filter() :
|
|
AssertSql(
|
|
@"SELECT [c].[CompanyName]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_inverted_boolean() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
[w].[IsAutomatic] = False,
|
|
True,
|
|
False
|
|
) AS [Manual]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[IsAutomatic] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_select_many() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
, [Orders] AS [o]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_StartsWith_MethodCall() :
|
|
AssertSql(
|
|
@"@__LocalMethod1_0='M' (Nullable = false) (Size = 1)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[ContactName] LIKE @__LocalMethod1_0 + '%' AND (LEFT([c].[ContactName], LEN(@__LocalMethod1_0)) = @__LocalMethod1_0)) OR (@__LocalMethod1_0 = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Sum_with_optional_navigation_is_translated_to_sql() :
|
|
AssertSql(
|
|
@"SELECT SUM([g].[SquadId])
|
|
FROM [Gear] AS [g]
|
|
LEFT JOIN [CogTag] AS [g#Tag] ON ([g].[Nickname] = [g#Tag].[GearNickName]) AND ([g].[SquadId] = [g#Tag].[GearSquadId])
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g#Tag].[Note] <> 'Foo') OR [g#Tag].[Note] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_method_string() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_of_type_kiwi() :
|
|
AssertSql(
|
|
@"SELECT [k].[Species], [k].[CountryId], [k].[Discriminator], [k].[Name], [k].[EagleId], [k].[IsFlightless], [k].[FoundOn]
|
|
FROM [Animal] AS [k]
|
|
WHERE ([k].[Discriminator] = 'Kiwi') AND ([k].[CountryId] = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_of_type_bird_first() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [b].[Species], [b].[CountryId], [b].[Discriminator], [b].[Name], [b].[EagleId], [b].[IsFlightless], [b].[Group], [b].[FoundOn]
|
|
FROM [Animal] AS [b]
|
|
WHERE [b].[Discriminator] IN ('Kiwi', 'Eagle') AND ([b].[CountryId] = 1)
|
|
ORDER BY [b].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_is_kiwi_in_projection() :
|
|
AssertSql(
|
|
@"SELECT IIf(
|
|
[a].[Discriminator] = 'Kiwi',
|
|
True,
|
|
False
|
|
)
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle') AND ([a].[CountryId] = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_of_type_bird_with_projection() :
|
|
AssertSql(
|
|
@"SELECT [b].[EagleId]
|
|
FROM [Animal] AS [b]
|
|
WHERE [b].[Discriminator] IN ('Kiwi', 'Eagle') AND ([b].[CountryId] = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_is_kiwi() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE ([a].[Discriminator] IN ('Kiwi', 'Eagle') AND ([a].[CountryId] = 1)) AND ([a].[Discriminator] = 'Kiwi')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_of_type_bird_predicate() :
|
|
AssertSql(
|
|
@"SELECT [b].[Species], [b].[CountryId], [b].[Discriminator], [b].[Name], [b].[EagleId], [b].[IsFlightless], [b].[Group], [b].[FoundOn]
|
|
FROM [Animal] AS [b]
|
|
WHERE ([b].[Discriminator] IN ('Kiwi', 'Eagle') AND ([b].[CountryId] = 1)) AND ([b].[CountryId] = 1)
|
|
ORDER BY [b].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_of_type_animal() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle') AND ([a].[CountryId] = 1)
|
|
ORDER BY [a].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Entity_equality_empty() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[Nickname] IS NULL AND ([g].[SquadId] = 0))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_int_to_string() :
|
|
AssertSql(
|
|
@"SELECT Str([o].[OrderID]) AS [ShipName]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_dependent_already_tracked(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_join_clause_with_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
INNER JOIN [Orders] AS [o0] ON [c0].[CustomerID] = [o0].[CustomerID]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_join_clause_with_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
INNER JOIN [Orders] AS [o0] ON [c0].[CustomerID] = [o0].[CustomerID]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_project_filter2() :
|
|
AssertSql(
|
|
@"SELECT [c].[City]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_conditional_operator() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(
|
|
[c].[Region] IS NULL,
|
|
'ZZ',
|
|
[c].[Region]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_then_include_collection(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID], [c#Orders].[OrderID]",
|
|
//
|
|
@"SELECT [c#Orders#OrderDetails].[OrderID], [c#Orders#OrderDetails].[ProductID], [c#Orders#OrderDetails].[Discount], [c#Orders#OrderDetails].[Quantity], [c#Orders#OrderDetails].[UnitPrice]
|
|
FROM [Order Details] AS [c#Orders#OrderDetails]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c#Orders0].[OrderID], [t0].[CustomerID]
|
|
FROM [Orders] AS [c#Orders0]
|
|
INNER JOIN (
|
|
SELECT [c1].[CustomerID]
|
|
FROM [Customers] AS [c1]
|
|
) AS [t0] ON [c#Orders0].[CustomerID] = [t0].[CustomerID]
|
|
) AS [t1] ON [c#Orders#OrderDetails].[OrderID] = [t1].[OrderID]
|
|
ORDER BY [t1].[CustomerID], [t1].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersJetTest.Compiled_query() :
|
|
AssertSql(
|
|
@"@__customerID='BERGS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = @__customerID",
|
|
//
|
|
@"@__customerID='BLAUS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = @__customerID");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_then_include_collection(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID], [c#Orders].[OrderID]",
|
|
//
|
|
@"SELECT [c#Orders#OrderDetails].[OrderID], [c#Orders#OrderDetails].[ProductID], [c#Orders#OrderDetails].[Discount], [c#Orders#OrderDetails].[Quantity], [c#Orders#OrderDetails].[UnitPrice]
|
|
FROM [Order Details] AS [c#Orders#OrderDetails]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c#Orders0].[OrderID], [t0].[CustomerID]
|
|
FROM [Orders] AS [c#Orders0]
|
|
INNER JOIN (
|
|
SELECT [c1].[CustomerID]
|
|
FROM [Customers] AS [c1]
|
|
) AS [t0] ON [c#Orders0].[CustomerID] = [t0].[CustomerID]
|
|
) AS [t1] ON [c#Orders#OrderDetails].[OrderID] = [t1].[OrderID]
|
|
ORDER BY [t1].[CustomerID], [t1].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_order_by_non_key_with_first_or_default(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CompanyName] DESC, [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID], [c0].[CompanyName]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CompanyName] DESC, [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CompanyName] DESC, [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_order_by_non_key_with_first_or_default(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CompanyName] DESC, [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID], [c0].[CompanyName]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CompanyName] DESC, [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CompanyName] DESC, [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_with_filter_reordered(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_with_filter_reordered(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation_Equals_Navigation() :
|
|
AssertSql(
|
|
@"SELECT [o1].[OrderID], [o1].[CustomerID], [o1].[EmployeeID], [o1].[OrderDate], [o2].[OrderID], [o2].[CustomerID], [o2].[EmployeeID], [o2].[OrderDate]
|
|
FROM [Orders] AS [o1]
|
|
, [Orders] AS [o2]
|
|
WHERE ([o1].[CustomerID] = [o2].[CustomerID]) OR ([o1].[CustomerID] IS NULL AND [o2].[CustomerID] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Contains_Column() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (Instr([c].[ContactName], [c].[ContactName]) > 0) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Contains_Identity() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (Instr([c].[ContactName], [c].[ContactName]) > 0) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_reversed() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE 'London' = [c].[City]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_concat_with_navigation2() :
|
|
AssertSql(
|
|
@"SELECT ([o#Customer].[City] + ' ') + [o#Customer].[City]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_filter_reordered(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_filter_reordered(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.GroupJoin_with_nav_projected_in_subquery_when_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [od0].[OrderID], [od0].[ProductID], [od0].[Discount], [od0].[Quantity], [od0].[UnitPrice], [od#Product0].[ProductID], [od#Product0].[Discontinued], [od#Product0].[ProductName], [od#Product0].[UnitPrice], [od#Product0].[UnitsInStock]
|
|
FROM [Order Details] AS [od0]
|
|
INNER JOIN [Products] AS [od#Product0] ON [od0].[ProductID] = [od#Product0].[ProductID]",
|
|
//
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate], [o#Customer0].[CustomerID], [o#Customer0].[Address], [o#Customer0].[City], [o#Customer0].[CompanyName], [o#Customer0].[ContactName], [o#Customer0].[ContactTitle], [o#Customer0].[Country], [o#Customer0].[Fax], [o#Customer0].[Phone], [o#Customer0].[PostalCode], [o#Customer0].[Region]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_collection_navigation_simple() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] LIKE 'A' + '%' AND (LEFT([c0].[CustomerID], LEN('A')) = 'A')
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.SelectMany_projection2() :
|
|
AssertSql(
|
|
@"SELECT [e1].[City], [e2].[Country], [e3].[FirstName]
|
|
FROM [Employees] AS [e1]
|
|
, [Employees] AS [e2]
|
|
, [Employees] AS [e3]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_static_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__StaticFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__StaticFieldValue_0",
|
|
//
|
|
@"@__StaticFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__StaticFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested_negated3() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE NOT EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A')) AND (([c].[City] <> 'London') OR [c].[City] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_subquery_involving_join_binds_to_correct_table() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] > 11000) AND [o].[OrderID] IN (
|
|
SELECT [od].[OrderID]
|
|
FROM [Order Details] AS [od]
|
|
INNER JOIN [Products] AS [od#Product] ON [od].[ProductID] = [od#Product].[ProductID]
|
|
WHERE [od#Product].[ProductName] = 'Chai'
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Collection_where_nav_prop_all_client() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BERGS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BLAUS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BLONP' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BOLID' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]");
|
|
|
|
Output truncated.
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Navigations_Where_Navigations() :
|
|
AssertSql(
|
|
@"SELECT [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE ([o#Customer].[City] = 'Seattle') AND (([o#Customer].[Phone] <> '555 555 5555') OR [o#Customer].[Phone] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Singleton_Navigation_With_Member_Access() :
|
|
AssertSql(
|
|
@"SELECT [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City] AS [B], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE ([o#Customer].[City] = 'Seattle') AND (([o#Customer].[Phone] <> '555 555 5555') OR [o#Customer].[Phone] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_not_in_optimization2() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE [c].[City] NOT IN ('London', 'Berlin')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_correlated_subquery_ordered() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID]
|
|
FROM [Customers] AS [c]",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation_Contains() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE Instr([o#Customer].[City], 'Sea') > 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE [o#Customer].[City] = 'Seattle'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_when_groupby(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[City], [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[City], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_when_groupby(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[City], [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[City], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_last_no_orderby(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID] DESC",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID] DESC
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_last_no_orderby(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID] DESC",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID] DESC
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Collection_select_nav_prop_single_or_default_then_nav_prop_nested() :
|
|
AssertSql(
|
|
@"SELECT 1
|
|
FROM [Customers] AS [e]
|
|
WHERE [e].[CustomerID] LIKE 'A' + '%' AND (LEFT([e].[CustomerID], LEN('A')) = 'A')",
|
|
//
|
|
@"SELECT TOP 2 [o#Customer0].[City]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]
|
|
WHERE [o0].[OrderID] = 10643",
|
|
//
|
|
@"SELECT TOP 2 [o#Customer0].[City]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]
|
|
WHERE [o0].[OrderID] = 10643",
|
|
//
|
|
@"SELECT TOP 2 [o#Customer0].[City]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]
|
|
WHERE [o0].[OrderID] = 10643",
|
|
//
|
|
@"SELECT TOP 2 [o#Customer0].[City]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]
|
|
WHERE [o0].[OrderID] = 10643");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_collection_FirstOrDefault_project_entity() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_DTO_with_member_init_distinct_in_subquery_used_in_projection_translated_to_server() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [t].[Id], [t].[Count]
|
|
FROM [Customers] AS [c]
|
|
, (
|
|
SELECT DISTINCT [o].[CustomerID] AS [Id], [o].[OrderID] AS [Count]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderID] < 10300
|
|
) AS [t]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.LastOrDefault() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_dependent_already_tracked(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_dependent_already_tracked(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.GroupJoin_with_nav_in_predicate_in_subquery_when_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [od0].[OrderID], [od0].[ProductID], [od0].[Discount], [od0].[Quantity], [od0].[UnitPrice], [od#Product0].[ProductID], [od#Product0].[Discontinued], [od#Product0].[ProductName], [od#Product0].[UnitPrice], [od#Product0].[UnitsInStock]
|
|
FROM [Order Details] AS [od0]
|
|
INNER JOIN [Products] AS [od#Product0] ON [od0].[ProductID] = [od#Product0].[ProductID]",
|
|
//
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate], [o#Customer0].[CustomerID], [o#Customer0].[Address], [o#Customer0].[City], [o#Customer0].[CompanyName], [o#Customer0].[ContactName], [o#Customer0].[ContactTitle], [o#Customer0].[Country], [o#Customer0].[Fax], [o#Customer0].[Phone], [o#Customer0].[PostalCode], [o#Customer0].[Region]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Project_single_entity_value_subquery_works() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.GroupJoin_with_nav_in_orderby_in_subquery_when_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [od0].[OrderID], [od0].[ProductID], [od0].[Discount], [od0].[Quantity], [od0].[UnitPrice], [od#Product0].[ProductID], [od#Product0].[Discontinued], [od#Product0].[ProductName], [od#Product0].[UnitPrice], [od#Product0].[UnitsInStock]
|
|
FROM [Order Details] AS [od0]
|
|
INNER JOIN [Products] AS [od#Product0] ON [od0].[ProductID] = [od#Product0].[ProductID]",
|
|
//
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate], [o#Customer0].[CustomerID], [o#Customer0].[Address], [o#Customer0].[City], [o#Customer0].[CompanyName], [o#Customer0].[ContactName], [o#Customer0].[ContactTitle], [o#Customer0].[Country], [o#Customer0].[Fax], [o#Customer0].[Phone], [o#Customer0].[PostalCode], [o#Customer0].[Region]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Take_Select_Navigation() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_conditional_order_by(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(
|
|
[c].[CustomerID] LIKE 'S' + '%' AND (LEFT([c].[CustomerID], LEN('S')) = 'S'),
|
|
1,
|
|
2
|
|
), [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID], IIf(
|
|
[c0].[CustomerID] LIKE 'S' + '%' AND (LEFT([c0].[CustomerID], LEN('S')) = 'S'),
|
|
1,
|
|
2
|
|
) AS [c]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[c], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Let_group_by_nav_prop() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice], [od#Order].[CustomerID] AS [customer]
|
|
FROM [Order Details] AS [od]
|
|
INNER JOIN [Orders] AS [od#Order] ON [od].[OrderID] = [od#Order].[OrderID]
|
|
ORDER BY [od#Order].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation_Included() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE [o#Customer].[City] = 'Seattle'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_simple() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_order_by_key(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Join_with_nav_in_predicate_in_subquery_when_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [od0].[OrderID], [od0].[ProductID], [od0].[Discount], [od0].[Quantity], [od0].[UnitPrice], [od#Product0].[ProductID], [od#Product0].[Discontinued], [od#Product0].[ProductName], [od#Product0].[UnitPrice], [od#Product0].[UnitsInStock]
|
|
FROM [Order Details] AS [od0]
|
|
INNER JOIN [Products] AS [od#Product0] ON [od0].[ProductID] = [od#Product0].[ProductID]",
|
|
//
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate], [o#Customer0].[CustomerID], [o#Customer0].[Address], [o#Customer0].[City], [o#Customer0].[CompanyName], [o#Customer0].[ContactName], [o#Customer0].[ContactTitle], [o#Customer0].[Country], [o#Customer0].[Fax], [o#Customer0].[Phone], [o#Customer0].[PostalCode], [o#Customer0].[Region]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation_Client() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Navigation_inside_contains() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE [o#Customer].[City] IN ('Novigrad', 'Seattle')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_collection_FirstOrDefault_project_anonymous_type() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[CustomerID], [o].[OrderID]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[CustomerID], [o].[OrderID]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation_Multiple_Access() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE ([o#Customer].[City] = 'Seattle') AND (([o#Customer].[Phone] <> '555 555 5555') OR [o#Customer].[Phone] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_principal_already_tracked(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_multi_level5() :
|
|
AssertSql(
|
|
@"SELECT (
|
|
SELECT TOP 1 (
|
|
SELECT TOP 1 [od].[ProductID]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] <> (
|
|
SELECT COUNT(*)
|
|
FROM [Orders] AS [o0]
|
|
WHERE [c].[CustomerID] = [o0].[CustomerID]
|
|
)) AND ([o].[OrderID] = [od].[OrderID])
|
|
)
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND ([c].[CustomerID] = [o].[CustomerID])
|
|
) AS [Order]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_with_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_with_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested_negated2() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (([c].[City] <> 'London') OR [c].[City] IS NULL) AND NOT EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_subquery_projection() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT TOP @__p_0 [c].[City]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_with_skip(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='80'
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName], [c].[CustomerID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_with_skip(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='80'
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName], [c].[CustomerID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_negated_twice() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_count_using_DTO() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID] AS [Id], (
|
|
SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE [c].[CustomerID] = [o].[CustomerID]
|
|
) AS [Count]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Collection_select_nav_prop_all_client() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BERGS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BLAUS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BLONP' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BOLID' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]");
|
|
|
|
Output truncated.
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Anonymous_complex_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] + [c].[City] AS [A]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[A] LIKE 'A' + '%' AND (LEFT([t].[A], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_EndsWith_Column() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (RIGHT([c].[ContactName], LEN([c].[ContactName])) = [c].[ContactName]) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Substring_with_client_eval() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[ContactName]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_multi_level_reference_and_collection_predicate(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE [o].[OrderID] = 10248
|
|
ORDER BY [o#Customer].[CustomerID]",
|
|
//
|
|
@"SELECT [o#Customer#Orders].[OrderID], [o#Customer#Orders].[CustomerID], [o#Customer#Orders].[EmployeeID], [o#Customer#Orders].[OrderDate]
|
|
FROM [Orders] AS [o#Customer#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [t].*
|
|
FROM (
|
|
SELECT TOP 1 [o#Customer0].[CustomerID]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]
|
|
WHERE [o0].[OrderID] = 10248
|
|
ORDER BY [o#Customer0].[CustomerID]
|
|
) AS [t]
|
|
) AS [t0] ON [o#Customer#Orders].[CustomerID] = [t0].[CustomerID]
|
|
ORDER BY [t0].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_multi_level_reference_and_collection_predicate(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE [o].[OrderID] = 10248
|
|
ORDER BY [o#Customer].[CustomerID]",
|
|
//
|
|
@"SELECT [o#Customer#Orders].[OrderID], [o#Customer#Orders].[CustomerID], [o#Customer#Orders].[EmployeeID], [o#Customer#Orders].[OrderDate]
|
|
FROM [Orders] AS [o#Customer#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [t].*
|
|
FROM (
|
|
SELECT TOP 1 [o#Customer0].[CustomerID]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]
|
|
WHERE [o0].[OrderID] = 10248
|
|
ORDER BY [o#Customer0].[CustomerID]
|
|
) AS [t]
|
|
) AS [t0] ON [o#Customer#Orders].[CustomerID] = [t0].[CustomerID]
|
|
ORDER BY [t0].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_parameter() :
|
|
AssertSql(
|
|
@"@__prm_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE @__prm_0 = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_not_in_optimization4() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE [c].[City] NOT IN ('London', 'Berlin', 'Seattle', 'Lisboa')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_last(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CompanyName] DESC, [c].[CustomerID] DESC",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID], [c0].[CompanyName]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CompanyName] DESC, [c0].[CustomerID] DESC
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CompanyName] DESC, [t].[CustomerID] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_member_distinct_where() :
|
|
AssertSql(
|
|
@"SELECT [t].[Property]
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] AS [Property]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[Property] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_where_skip_take_projection(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='1'
|
|
@__p_1='2'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [od#Order].[CustomerID]
|
|
FROM [Order Details] AS [od]
|
|
INNER JOIN [Orders] AS [od#Order] ON [od].[OrderID] = [od#Order].[OrderID]
|
|
WHERE [od].[Quantity] = 10
|
|
ORDER BY [od].[OrderID], [od].[ProductID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_where_skip_take_projection(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='1'
|
|
@__p_1='2'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [od#Order].[CustomerID]
|
|
FROM [Order Details] AS [od]
|
|
INNER JOIN [Orders] AS [od#Order] ON [od].[OrderID] = [od#Order].[OrderID]
|
|
WHERE [od].[Quantity] = 10
|
|
ORDER BY [od].[OrderID], [od].[ProductID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_multi_level3() :
|
|
AssertSql(
|
|
@"SELECT (
|
|
SELECT TOP 1 [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND ([c].[CustomerID] = [o].[CustomerID])
|
|
) AS [OrderDates]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.SelectMany_Count() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Customers] AS [c]
|
|
, [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_shadow_subquery_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[Title] = (
|
|
SELECT TOP 1 [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
ORDER BY [e2].[Title]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_additional_from_clause_with_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c1]
|
|
, [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c0].[CustomerID]
|
|
FROM [Customers] AS [c10]
|
|
, [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_false() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_member_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] AS [Property]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[Property] LIKE 'A' + '%' AND (LEFT([t].[Property], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_using_int_overload_on_mismatched_types() :
|
|
AssertSql(
|
|
@"@__shortPrm_0='1'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[EmployeeID] = @__shortPrm_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_EndsWith_Identity() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (RIGHT([c].[ContactName], LEN([c].[ContactName])) = [c].[ContactName]) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_de_morgan_and_optimizated() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ([p].[Discontinued] = False) OR ([p].[ProductID] >= 20)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Local_array() :
|
|
AssertSql(
|
|
@"@__get_Item_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = @__get_Item_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_Customers_Orders_Skip_Take() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
@__p_1='5'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [c].[ContactName], [o].[OrderID]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_long_to_string() :
|
|
AssertSql(
|
|
@"SELECT Str([o].[OrderID]) AS [ShipName]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Distinct_Take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT TOP @__p_0 [t].[OrderID], [t].[CustomerID], [t].[EmployeeID], [t].[OrderDate]
|
|
FROM (
|
|
SELECT DISTINCT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
) AS [t]
|
|
ORDER BY [t].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_sql_injection() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ALFKI', 'ABC'')); GO; DROP TABLE Orders; GO; --', 'ALFKI', 'ABCDE')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested3() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A')) AND (([c].[City] <> 'London') OR [c].[City] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.SelectMany_projection1() :
|
|
AssertSql(
|
|
@"SELECT [e1].[City], [e2].[Country]
|
|
FROM [Employees] AS [e1]
|
|
, [Employees] AS [e2]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_EndsWith_MethodCall() :
|
|
AssertSql(
|
|
@"@__LocalMethod2_0='m' (Nullable = false) (Size = 1)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (RIGHT([c].[ContactName], LEN(@__LocalMethod2_0)) = @__LocalMethod2_0) OR (@__LocalMethod2_0 = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_0",
|
|
//
|
|
@"@__city_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_expression_invoke() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Anonymous_member_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[CustomerID] LIKE 'A' + '%' AND (LEFT([t].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_Customers_Orders_Projection_With_String_Concat_Skip_Take() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
@__p_1='5'
|
|
|
|
SELECT TOP @__p_1+@__p_0 ([c].[ContactName] + ' ') + [c].[ContactTitle] AS [Contact], [o].[OrderID]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_select_many_or3() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE [c].[City] IN ('London', 'Berlin', 'Seattle')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_compared_to_binary_expression() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = IIf(
|
|
[p].[ProductID] > 50,
|
|
True,
|
|
False
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Null_conditional_simple() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_comparison_to_nullable_bool() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE RIGHT([c].[CustomerID], LEN('KI')) = 'KI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_subquery_and_local_array_closure() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Customers] AS [c1]
|
|
WHERE [c1].[City] IN ('London', 'Buenos Aires') AND ([c1].[CustomerID] = [c].[CustomerID]))",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Customers] AS [c1]
|
|
WHERE [c1].[City] IN ('London') AND ([c1].[CustomerID] = [c].[CustomerID]))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_many_cross_join_same_collection() :
|
|
AssertSql(
|
|
@"SELECT [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region]
|
|
FROM [Customers] AS [c]
|
|
, [Customers] AS [c0]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_LastOrDefault() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Contains_Literal() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE Instr([c].[ContactName], 'M') > 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_on_mismatched_types_nullable_int_long() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True",
|
|
//
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_false() :
|
|
AssertSql(
|
|
@"@__flag_0='False'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ((@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)) OR ((@__flag_0 <> True) AND ([p].[UnitsInStock] < 20))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Single_Predicate() :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_simple_parameterized() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_complex_predicate_or() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI', 'ALFKI', 'ABCDE')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_select_many_and() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE (([c].[City] = 'London') AND ([c].[Country] = 'UK')) AND (([e].[City] = 'London') AND ([e].[Country] = 'UK'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_with_multiple_conditions_still_uses_exists() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[City] = 'London') AND EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[EmployeeID] = 1) AND ([c].[CustomerID] = [o].[CustomerID]))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_other_to_string() :
|
|
AssertSql(
|
|
@"SELECT Str([o].[OrderDate]) AS [ShipName]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_join_select() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_sin() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (SIN([od].[Discount]) > 0E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_skip_take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
@__p_1='8'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactTitle], [c].[ContactName]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_in_optimization_multiple() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE ([c].[City] IN ('London', 'Berlin') OR ([c].[CustomerID] = 'ALFKI')) OR ([c].[CustomerID] = 'ABCDE')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_negated_boolean_expression_compared_to_another_negated_boolean_expression() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE IIf(
|
|
[p].[ProductID] > 50,
|
|
True,
|
|
False
|
|
) = IIf(
|
|
[p].[ProductID] > 20,
|
|
True,
|
|
False
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_StartsWith_Identity() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[ContactName] LIKE [c].[ContactName] + '%' AND (LEFT([c].[ContactName], LEN([c].[ContactName])) = [c].[ContactName])) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OfType_Select() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [o#Customer].[City]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
ORDER BY [o].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_complex_distinct_where() :
|
|
AssertSql(
|
|
@"SELECT [t].[Property]
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] + [c].[City] AS [Property]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[Property] = 'ALFKIBerlin'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_select_many_or_with_parameter() :
|
|
AssertSql(
|
|
@"@__lisboa_1='Lisboa' (Nullable = false) (Size = 6)
|
|
@__london_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE [c].[City] IN (@__london_0, 'Berlin', 'Seattle', @__lisboa_1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.SelectMany_entity_deep() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title], [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title], [e3].[EmployeeID], [e3].[City], [e3].[Country], [e3].[FirstName], [e3].[ReportsTo], [e3].[Title], [e4].[EmployeeID], [e4].[City], [e4].[Country], [e4].[FirstName], [e4].[ReportsTo], [e4].[Title]
|
|
FROM [Employees] AS [e1]
|
|
, [Employees] AS [e2]
|
|
, [Employees] AS [e3]
|
|
, [Employees] AS [e4]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_true() :
|
|
AssertSql(
|
|
@"@__flag_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ((@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)) OR ((@__flag_0 <> True) AND ([p].[UnitsInStock] < 20))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_complex_predicate_not_matching_ins1() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ALFKI', 'ABCDE') OR [c].[CustomerID] NOT IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_client_side_negated() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_multi_level() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 3 [o].[OrderDate] AS [Date]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND (@_outer_CustomerID = [o].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 3 [o].[OrderDate] AS [Date]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND (@_outer_CustomerID = [o].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 3 [o].[OrderDate] AS [Date]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND (@_outer_CustomerID = [o].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 3 [o].[OrderDate] AS [Date]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND (@_outer_CustomerID = [o].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_SelectMany() :
|
|
AssertSql(
|
|
@"SELECT [c].[ContactName], [t].[OrderID]
|
|
FROM [Customers] AS [c]
|
|
, (
|
|
SELECT TOP 3 [o].*
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]
|
|
) AS [t]
|
|
WHERE [c].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.IsNullOrEmpty_in_projection() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID] AS [Id], IIf(
|
|
[c].[Region] IS NULL OR ([c].[Region] = ''),
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_shadow_projection() :
|
|
AssertSql(
|
|
@"SELECT [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[Title] = 'Sales Representative'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_closure_via_query_cache_nullable_type() :
|
|
AssertSql(
|
|
@"@__reportsTo_0='2'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__reportsTo_0",
|
|
//
|
|
@"@__reportsTo_0='5'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__reportsTo_0",
|
|
//
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_nested_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_Nested_InstanceFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstanceFieldValue_0",
|
|
//
|
|
@"@__city_Nested_InstanceFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstanceFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_DefaultIfEmpty_Where() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Customers] AS [c]
|
|
LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [o].[OrderID] IS NOT NULL AND ([o].[CustomerID] = 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_constant_is_null() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested_negated() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE NOT EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Last() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_method_call_nullable_type_reverse_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_NullableInt_0='1'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[EmployeeID] > @__city_NullableInt_0",
|
|
//
|
|
@"@__city_NullableInt_0='5'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[EmployeeID] > @__city_NullableInt_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_subquery_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__customerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[CustomerID] = @__customerID_0) AND ([o].[CustomerID] = [c].[CustomerID]))",
|
|
//
|
|
@"@__customerID_0='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[CustomerID] = @__customerID_0) AND ([o].[CustomerID] = [c].[CustomerID]))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_exp() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (EXP([od].[Discount]) > 1E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Skip_Take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
@__p_1='10'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_de_morgan_or_optimizated() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ([p].[Discontinued] = False) AND ([p].[ProductID] >= 20)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title]
|
|
FROM [Employees] AS [e1]
|
|
WHERE [e1].[FirstName] = (
|
|
SELECT TOP 1 [e].[FirstName]
|
|
FROM [Employees] AS [e]
|
|
ORDER BY [e].[EmployeeID]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_scalar_primitive_after_take() :
|
|
AssertSql(
|
|
@"@__p_0='9'
|
|
|
|
SELECT TOP @__p_0 [e].[EmployeeID]
|
|
FROM [Employees] AS [e]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.FirstOrDefault_inside_subquery_gets_server_evaluated() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[CustomerID] = 'ALFKI') AND ((
|
|
SELECT TOP 1 [o].[CustomerID]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[CustomerID] = 'ALFKI') AND ([c].[CustomerID] = [o].[CustomerID])
|
|
) = 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_orderby_select_many() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
, [Orders] AS [o]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.IsNullOrWhiteSpace_in_predicate() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[Region] IS NULL OR (LTRIM(RTRIM([c].[Region])) = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_array_closure() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI')",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Subquery_is_null_translated_correctly() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (
|
|
SELECT TOP 1 [o].[CustomerID]
|
|
FROM [Orders] AS [o]
|
|
WHERE [c].[CustomerID] = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID] DESC
|
|
) IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_multi_level4() :
|
|
AssertSql(
|
|
@"SELECT (
|
|
SELECT TOP 1 (
|
|
SELECT COUNT(*)
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] > 10) AND ([o].[OrderID] = [od].[OrderID])
|
|
)
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND ([c].[CustomerID] = [o].[CustomerID])
|
|
) AS [Order]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Handle_materialization_properly_when_more_than_two_query_sources_are_involved() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
, [Orders] AS [o]
|
|
, [Employees] AS [e]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Query_expression_with_to_string_and_contains() :
|
|
AssertSql(
|
|
@"SELECT [o].[CustomerID]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL AND (Instr(Str([o].[EmployeeID]), '10') > 0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_simple_projection() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[City]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_static_property_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__StaticPropertyValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__StaticPropertyValue_0",
|
|
//
|
|
@"@__StaticPropertyValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__StaticPropertyValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_subquery_on_bool() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE 'Chai' IN (
|
|
SELECT [p2].[ProductName]
|
|
FROM [Products] AS [p2]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_Where_Subquery_Deep_First() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT TOP @__p_0 [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE (
|
|
SELECT TOP 1 (
|
|
SELECT TOP 1 [c].[City]
|
|
FROM [Customers] AS [c]
|
|
WHERE [o].[CustomerID] = [c].[CustomerID]
|
|
)
|
|
FROM [Orders] AS [o]
|
|
WHERE [od].[OrderID] = [o].[OrderID]
|
|
) = 'Seattle'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_client_deep_inside_predicate_and_server_top_level() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <> 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Subquery_is_not_null_translated_correctly() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (
|
|
SELECT TOP 1 [o].[CustomerID]
|
|
FROM [Orders] AS [o]
|
|
WHERE [c].[CustomerID] = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID] DESC
|
|
) IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_false() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] NOT IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_parameter_compared_to_binary_expression() :
|
|
AssertSql(
|
|
@"@__prm_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE IIf(
|
|
[p].[ProductID] > 50,
|
|
True,
|
|
False
|
|
) <> @__prm_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Last_when_no_order_by() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_anonymous_conditional_expression() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], IIf(
|
|
[p].[UnitsInStock] > 0,
|
|
True,
|
|
False
|
|
) AS [IsAvailable]
|
|
FROM [Products] AS [p]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_not_bool_member_compared_to_binary_expression() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] <> IIf(
|
|
[p].[ProductID] > 50,
|
|
True,
|
|
False
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_orderby_join_select() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] <> 'ALFKI'
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_DTO_with_member_init_distinct_in_subquery_translated_to_server() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[Count], [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM (
|
|
SELECT DISTINCT [o].[CustomerID] AS [Id], [o].[OrderID] AS [Count]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderID] < 10300
|
|
) AS [t]
|
|
, [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = [t].[Id]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_no_elements_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title]
|
|
FROM [Employees] AS [e1]
|
|
WHERE (
|
|
SELECT TOP 1 [e2].[EmployeeID]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = 42
|
|
) = 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_not_in_optimization1() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE (([c].[City] <> 'London') OR [c].[City] IS NULL) AND (([e].[City] <> 'London') OR [e].[City] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_cos() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (COS([od].[Discount]) > 0E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_not_in_optimization3() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE [c].[City] NOT IN ('London', 'Berlin', 'Seattle')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.SelectMany_simple2() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title], [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e2].[FirstName] AS [FirstName0]
|
|
FROM [Employees] AS [e1]
|
|
, [Customers] AS [c]
|
|
, [Employees] AS [e2]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested2() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (([c].[City] <> 'London') OR [c].[City] IS NULL) AND EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Count_with_predicate() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupBy_anonymous_with_where() :
|
|
AssertSql(
|
|
@"SELECT [c].[City], [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[Country] IN ('Argentina', 'Austria', 'Brazil', 'France', 'Germany', 'USA')
|
|
ORDER BY [c].[City]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_list_inline_closure_mix() : line_closure_mix() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 6242
|
|
AssertSql(
|
|
@"@__id_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', @__id_0)",
|
|
//
|
|
@"@__id_0='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', @__id_0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_closure_via_query_cache_nullable_type_reverse() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] IS NULL",
|
|
//
|
|
@"@__reportsTo_0='5'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__reportsTo_0",
|
|
//
|
|
@"@__reportsTo_0='2'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__reportsTo_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_property_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_InstancePropertyValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstancePropertyValue_0",
|
|
//
|
|
@"@__city_InstancePropertyValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstancePropertyValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_select_many_or2() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE [c].[City] IN ('London', 'Berlin')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_null_is_not_null() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_Where_Count_with_predicate() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] > 10) AND (([o].[CustomerID] <> 'ALFKI') OR [o].[CustomerID] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.IsNullOrEmpty_negated_in_projection() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID] AS [Id], IIf(
|
|
[c].[Region] IS NOT NULL AND ([c].[Region] <> ''),
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OfType_Select_OfType_Select() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [o#Customer].[City]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
ORDER BY [o].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_Where_Subquery_Deep_Single() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE [od].[OrderID] = 10344",
|
|
//
|
|
@"@_outer_OrderID='10344'
|
|
|
|
SELECT TOP 2 [o0].[CustomerID]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_OrderID = [o0].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID1='WHITC' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 2 [c2].[City]
|
|
FROM [Customers] AS [c2]
|
|
WHERE @_outer_CustomerID1 = [c2].[CustomerID]",
|
|
//
|
|
@"@_outer_OrderID='10344'
|
|
|
|
SELECT TOP 2 [o0].[CustomerID]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_OrderID = [o0].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID1='WHITC' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 2 [c2].[City]
|
|
FROM [Customers] AS [c2]
|
|
WHERE @_outer_CustomerID1 = [c2].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_nested_property_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_Nested_InstancePropertyValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstancePropertyValue_0",
|
|
//
|
|
@"@__city_Nested_InstancePropertyValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstancePropertyValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_and_parameter_compared_to_binary_expression_nested() :
|
|
AssertSql(
|
|
@"@__prm_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = IIf(
|
|
IIf(
|
|
[p].[ProductID] > 50,
|
|
True,
|
|
False
|
|
) <> @__prm_0,
|
|
True,
|
|
False
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_Last() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Contains_MethodCall() :
|
|
AssertSql(
|
|
@"@__LocalMethod1_0='M' (Nullable = false) (Size = 1)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (Instr([c].[ContactName], @__LocalMethod1_0) > 0) OR (@__LocalMethod1_0 = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_compare_with_parameter() :
|
|
AssertSql(
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] > @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] < @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] >= @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] >= @__customer_CustomerID_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Anonymous_complex_distinct_where() :
|
|
AssertSql(
|
|
@"SELECT [t].[A]
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] + [c].[City] AS [A]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[A] = 'ALFKIBerlin'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_equals_constant() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_InstanceFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstanceFieldValue_0",
|
|
//
|
|
@"@__city_InstanceFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstanceFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_on_matched_nullable_int_types() :
|
|
AssertSql(
|
|
@"@__nullableIntPrm_0='2'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE @__nullableIntPrm_0 = [e].[ReportsTo]",
|
|
//
|
|
@"@__nullableIntPrm_0='2'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__nullableIntPrm_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_OrderBy_Count() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_with_false_as_result_false() :
|
|
AssertSql(
|
|
@"@__flag_0='False'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE (@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Compare_multi_predicate() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] >= 'ALFKI' AND [c].[CustomerID] < 'CACTU'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[ContactTitle] = 'Owner' AND [c].[Country] <> 'USA'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_complex_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] + [c].[City] AS [Property]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[Property] LIKE 'A' + '%' AND (LEFT([t].[Property], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_with_false_as_result_true() :
|
|
AssertSql(
|
|
@"@__flag_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE (@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_new_instance_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__InstanceFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__InstanceFieldValue_0",
|
|
//
|
|
@"@__InstanceFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__InstanceFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_compare_null() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] IS NULL AND ([c].[Country] = 'UK')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Entity_equality_local() :
|
|
AssertSql(
|
|
@"@__local_0_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = @__local_0_CustomerID");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Queryable_simple_anonymous_projection_subquery() :
|
|
AssertSql(
|
|
@"@__p_0='91'
|
|
|
|
SELECT TOP @__p_0 [c].[City]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_false() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = False");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_comparison_operator() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(
|
|
[c].[Region] = 'ASK',
|
|
True,
|
|
False
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_multiple_elements_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title]
|
|
FROM [Employees] AS [e1]
|
|
WHERE (
|
|
SELECT TOP 1 [e2].[EmployeeID]
|
|
FROM [Employees] AS [e2]
|
|
WHERE ([e2].[EmployeeID] <> [e1].[ReportsTo]) OR [e1].[ReportsTo] IS NULL
|
|
) = 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_using_object_overload_on_mismatched_types() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.SelectMany_simple1() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title], [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Employees] AS [e]
|
|
, [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_complex_predicate_and() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ALFKI', 'ABCDE') AND [c].[CustomerID] IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_shadow() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_on_mismatched_types_nullable_long_nullable_int() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True",
|
|
//
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_StartsWith_Literal() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[ContactName] LIKE 'M' + '%' AND (LEFT([c].[ContactName], LEN('M')) = 'M')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_one_element_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title]
|
|
FROM [Employees] AS [e1]
|
|
WHERE (
|
|
SELECT TOP 1 [e2].[EmployeeID]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = [e1].[ReportsTo]
|
|
) = 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_false_shadow() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = False");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_tan() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (TAN([od].[Discount]) > 0E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_array_inline() : line() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 6212
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_conditional_operator_where_condition_null() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(
|
|
False = True,
|
|
'ZZ',
|
|
[c].[City]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Last_Predicate() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Entity_equality_local_inline() : line() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 173
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ANATR'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_multi_level2() :
|
|
AssertSql(
|
|
@"SELECT (
|
|
SELECT TOP 1 [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND ([c].[CustomerID] = [o].[CustomerID])
|
|
) AS [OrderDates]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_Where() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Environment_newline_is_funcletized() : line_is_funcletized() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 6638
|
|
AssertSql(
|
|
@"@__NewLine_0='
|
|
' (Nullable = false) (Size = 2)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (Instr([c].[CustomerID], @__NewLine_0) > 0) OR (@__NewLine_0 = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Compare_simple_one() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] > 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] < 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] >= 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] >= 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.LastOrDefault_Predicate() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_complex_negated_expression_optimized() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE (([p].[Discontinued] = False) AND ([p].[ProductID] < 60)) AND ([p].[ProductID] > 30)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_list_closure() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Discriminator_used_when_projection_over_of_type() :
|
|
AssertSql(
|
|
@"SELECT [k].[FoundOn]
|
|
FROM [Animal] AS [k]
|
|
WHERE [k].[Discriminator] = 'Kiwi'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_query_all_types_when_shared_column() :
|
|
AssertSql(
|
|
@"SELECT [d].[Id], [d].[Discriminator], [d].[CaffeineGrams], [d].[CokeCO2], [d].[SugarGrams], [d].[LiltCO2], [d].[HasMilk]
|
|
FROM [Drink] AS [d]
|
|
WHERE [d].[Discriminator] IN ('Tea', 'Lilt', 'Coke', 'Drink')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_of_type_kiwi_where_north_on_derived_property() :
|
|
AssertSql(
|
|
@"SELECT [x].[Species], [x].[CountryId], [x].[Discriminator], [x].[Name], [x].[EagleId], [x].[IsFlightless], [x].[FoundOn]
|
|
FROM [Animal] AS [x]
|
|
WHERE ([x].[Discriminator] = 'Kiwi') AND ([x].[FoundOn] = 0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_query_all_birds() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle')
|
|
ORDER BY [a].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_include_prey() :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [e].[Species], [e].[CountryId], [e].[Discriminator], [e].[Name], [e].[EagleId], [e].[IsFlightless], [e].[Group]
|
|
FROM [Animal] AS [e]
|
|
WHERE [e].[Discriminator] = 'Eagle'
|
|
ORDER BY [e].[Species]",
|
|
//
|
|
@"SELECT [e#Prey].[Species], [e#Prey].[CountryId], [e#Prey].[Discriminator], [e#Prey].[Name], [e#Prey].[EagleId], [e#Prey].[IsFlightless], [e#Prey].[Group], [e#Prey].[FoundOn]
|
|
FROM [Animal] AS [e#Prey]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [e0].[Species]
|
|
FROM [Animal] AS [e0]
|
|
WHERE [e0].[Discriminator] = 'Eagle'
|
|
ORDER BY [e0].[Species]
|
|
) AS [t] ON [e#Prey].[EagleId] = [t].[Species]
|
|
WHERE [e#Prey].[Discriminator] IN ('Kiwi', 'Eagle')
|
|
ORDER BY [t].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Discriminator_used_when_projection_over_derived_type() :
|
|
AssertSql(
|
|
@"SELECT [k].[FoundOn]
|
|
FROM [Animal] AS [k]
|
|
WHERE [k].[Discriminator] = 'Kiwi'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_of_type_animal() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle')
|
|
ORDER BY [a].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_of_type_bird() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle')
|
|
ORDER BY [a].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_query_when_shared_column() :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [d].[Id], [d].[Discriminator], [d].[CaffeineGrams], [d].[CokeCO2], [d].[SugarGrams]
|
|
FROM [Drink] AS [d]
|
|
WHERE [d].[Discriminator] = 'Coke'",
|
|
//
|
|
@"SELECT TOP 2 [d].[Id], [d].[Discriminator], [d].[LiltCO2], [d].[SugarGrams]
|
|
FROM [Drink] AS [d]
|
|
WHERE [d].[Discriminator] = 'Lilt'",
|
|
//
|
|
@"SELECT TOP 2 [d].[Id], [d].[Discriminator], [d].[CaffeineGrams], [d].[HasMilk]
|
|
FROM [Drink] AS [d]
|
|
WHERE [d].[Discriminator] = 'Tea'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_Where_Count_with_predicate_client_eval_mixed() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[CustomerID] <> 'ALFKI') OR [o].[CustomerID] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_of_type_bird_predicate() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle') AND ([a].[CountryId] = 1)
|
|
ORDER BY [a].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_is_kiwi_in_projection() :
|
|
AssertSql(
|
|
@"SELECT IIf(
|
|
[a].[Discriminator] = 'Kiwi',
|
|
True,
|
|
False
|
|
)
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_query_just_kiwis() :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] = 'Kiwi'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_alias_generation(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"SELECT [o#OrderDetails].[OrderID], [o#OrderDetails].[ProductID], [o#OrderDetails].[Discount], [o#OrderDetails].[Quantity], [o#OrderDetails].[UnitPrice]
|
|
FROM [Order Details] AS [o#OrderDetails]
|
|
INNER JOIN (
|
|
SELECT [o0].[OrderID]
|
|
FROM [Orders] AS [o0]
|
|
) AS [t] ON [o#OrderDetails].[OrderID] = [t].[OrderID]
|
|
ORDER BY [t].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_filter_all_animals() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle') AND ([a].[Name] = 'Great spotted kiwi')
|
|
ORDER BY [a].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_of_type_kiwi() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] = 'Kiwi'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_is_kiwi() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle') AND ([a].[Discriminator] = 'Kiwi')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_of_type_bird_first() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle')
|
|
ORDER BY [a].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Discriminator_used_when_projection_over_derived_type2() :
|
|
AssertSql(
|
|
@"SELECT [b].[IsFlightless], [b].[Discriminator]
|
|
FROM [Animal] AS [b]
|
|
WHERE [b].[Discriminator] IN ('Kiwi', 'Eagle')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_query_all_animals() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle')
|
|
ORDER BY [a].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_select_many() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
, [Orders] AS [o]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_StartsWith_MethodCall() :
|
|
AssertSql(
|
|
@"@__LocalMethod1_0='M' (Nullable = false) (Size = 1)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[ContactName] LIKE @__LocalMethod1_0 + '%' AND (LEFT([c].[ContactName], LEN(@__LocalMethod1_0)) = @__LocalMethod1_0)) OR (@__LocalMethod1_0 = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.First_inside_subquery_gets_client_evaluated() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o0].[CustomerID]
|
|
FROM [Orders] AS [o0]
|
|
WHERE ([o0].[CustomerID] = 'ALFKI') AND (@_outer_CustomerID = [o0].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_Count_with_predicate() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_method_string() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Filter_coalesce_operator() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE IIf(IsNull([c].[CompanyName]), [c].[ContactName], [c].[CompanyName]) = 'The Big Cheese'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_alias_generation(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"SELECT [o#OrderDetails].[OrderID], [o#OrderDetails].[ProductID], [o#OrderDetails].[Discount], [o#OrderDetails].[Quantity], [o#OrderDetails].[UnitPrice]
|
|
FROM [Order Details] AS [o#OrderDetails]
|
|
INNER JOIN (
|
|
SELECT [o0].[OrderID]
|
|
FROM [Orders] AS [o0]
|
|
) AS [t] ON [o#OrderDetails].[OrderID] = [t].[OrderID]
|
|
ORDER BY [t].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Include_on_GroupJoin_SelectMany_DefaultIfEmpty_with_inheritance_and_coalesce_result() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank], [t].[Nickname], [t].[SquadId], [t].[AssignedCityName], [t].[CityOrBirthName], [t].[Discriminator], [t].[FullName], [t].[HasSoulPatch], [t].[LeaderNickname], [t].[LeaderSquadId], [t].[Rank]
|
|
FROM [Gear] AS [g]
|
|
LEFT JOIN (
|
|
SELECT [g2].*
|
|
FROM [Gear] AS [g2]
|
|
WHERE [g2].[Discriminator] = 'Officer'
|
|
) AS [t] ON [g].[LeaderNickname] = [t].[Nickname]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear')
|
|
ORDER BY [t].[FullName], [g].[FullName]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_Subquery_Single() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT TOP @__p_0 [od].[OrderID]
|
|
FROM [Order Details] AS [od]
|
|
ORDER BY [od].[ProductID], [od].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10285'
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_OrderID = [o].[OrderID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10294'
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_OrderID = [o].[OrderID]
|
|
ORDER BY [o].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_ternary_operation_with_has_value_not_null() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
[w].[AmmunitionType] IS NOT NULL AND ([w].[AmmunitionType] = 1),
|
|
'Yes',
|
|
'No'
|
|
) AS [IsCartidge]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[AmmunitionType] IS NOT NULL AND ([w].[AmmunitionType] = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_inverted_boolean() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
[w].[IsAutomatic] = False,
|
|
True,
|
|
False
|
|
) AS [Manual]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[IsAutomatic] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bitwise_or() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (IIf(
|
|
[c].[CustomerID] = 'ALFKI',
|
|
True,
|
|
False
|
|
) BOR IIf(
|
|
[c].[CustomerID] = 'ANATR',
|
|
True,
|
|
False
|
|
)) = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_int_to_string() :
|
|
AssertSql(
|
|
@"SELECT Str([o].[OrderID]) AS [ShipName]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Sum_with_optional_navigation_is_translated_to_sql() :
|
|
AssertSql(
|
|
@"SELECT SUM([g].[SquadId])
|
|
FROM [Gear] AS [g]
|
|
LEFT JOIN [CogTag] AS [g#Tag] ON ([g].[Nickname] = [g#Tag].[GearNickName]) AND ([g].[SquadId] = [g#Tag].[GearSquadId])
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g#Tag].[Note] <> 'Foo') OR [g#Tag].[Note] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_project_filter2() :
|
|
AssertSql(
|
|
@"SELECT [c].[City]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_alias_generation(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice], [o#Order].[OrderID], [o#Order].[CustomerID], [o#Order].[EmployeeID], [o#Order].[OrderDate]
|
|
FROM [Order Details] AS [o]
|
|
INNER JOIN [Orders] AS [o#Order] ON [o].[OrderID] = [o#Order].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_conditional_operator() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(
|
|
[c].[Region] IS NULL,
|
|
'ZZ',
|
|
[c].[Region]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Collection_select_nav_prop_first_or_default_then_nav_prop() :
|
|
AssertSql(
|
|
@"SELECT [e].[CustomerID]
|
|
FROM [Customers] AS [e]
|
|
WHERE [e].[CustomerID] LIKE 'A' + '%' AND (LEFT([e].[CustomerID], LEN('A')) = 'A')
|
|
ORDER BY [e].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [e#Customer].[CustomerID], [e#Customer].[Address], [e#Customer].[City], [e#Customer].[CompanyName], [e#Customer].[ContactName], [e#Customer].[ContactTitle], [e#Customer].[Country], [e#Customer].[Fax], [e#Customer].[Phone], [e#Customer].[PostalCode], [e#Customer].[Region]
|
|
FROM [Orders] AS [e0]
|
|
LEFT JOIN [Customers] AS [e#Customer] ON [e0].[CustomerID] = [e#Customer].[CustomerID]
|
|
WHERE [e0].[OrderID] IN (10643, 10692, 10702, 10835, 10952, 11011) AND (@_outer_CustomerID = [e0].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [e#Customer].[CustomerID], [e#Customer].[Address], [e#Customer].[City], [e#Customer].[CompanyName], [e#Customer].[ContactName], [e#Customer].[ContactTitle], [e#Customer].[Country], [e#Customer].[Fax], [e#Customer].[Phone], [e#Customer].[PostalCode], [e#Customer].[Region]
|
|
FROM [Orders] AS [e0]
|
|
LEFT JOIN [Customers] AS [e#Customer] ON [e0].[CustomerID] = [e#Customer].[CustomerID]
|
|
WHERE [e0].[OrderID] IN (10643, 10692, 10702, 10835, 10952, 11011) AND (@_outer_CustomerID = [e0].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [e#Customer].[CustomerID], [e#Customer].[Address], [e#Customer].[City], [e#Customer].[CompanyName], [e#Customer].[ContactName], [e#Customer].[ContactTitle], [e#Customer].[Country], [e#Customer].[Fax], [e#Customer].[Phone], [e#Customer].[PostalCode], [e#Customer].[Region]
|
|
FROM [Orders] AS [e0]
|
|
LEFT JOIN [Customers] AS [e#Customer] ON [e0].[CustomerID] = [e#Customer].[CustomerID]
|
|
WHERE [e0].[OrderID] IN (10643, 10692, 10702, 10835, 10952, 11011) AND (@_outer_CustomerID = [e0].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [e#Customer].[CustomerID], [e#Customer].[Address], [e#Customer].[City], [e#Customer].[CompanyName], [e#Customer].[ContactName], [e#Customer].[ContactTitle], [e#Customer].[Country], [e#Customer].[Fax], [e#Customer].[Phone], [e#Customer].[PostalCode], [e#Customer].[Region]
|
|
FROM [Orders] AS [e0]
|
|
LEFT JOIN [Customers] AS [e#Customer] ON [e0].[CustomerID] = [e#Customer].[CustomerID]
|
|
WHERE [e0].[OrderID] IN (10643, 10692, 10702, 10835, 10952, 11011) AND (@_outer_CustomerID = [e0].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Navigation_fk_based_inside_contains() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] IN ('ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_comparison_with_null() :
|
|
AssertSql(
|
|
@"@__ammunitionType_0='Cartridge'
|
|
@__ammunitionType_1='Cartridge'
|
|
|
|
SELECT [w].[Id], IIf(
|
|
[w].[AmmunitionType] = @__ammunitionType_1,
|
|
True,
|
|
False
|
|
) AS [Cartidge]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[AmmunitionType] = @__ammunitionType_0",
|
|
//
|
|
@"SELECT [w].[Id], IIf(
|
|
[w].[AmmunitionType] IS NULL,
|
|
True,
|
|
False
|
|
) AS [Cartidge]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[AmmunitionType] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_length_of_string_property() :
|
|
AssertSql(
|
|
@"SELECT [w].[Name], CInt(IIf(IsNull(LEN([w].[Name])),0,LEN([w].[Name]))) AS [Length]
|
|
FROM [Weapon] AS [w]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Entity_equality_empty() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[Nickname] IS NULL AND ([g].[SquadId] = 0))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_alias_generation(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice], [o#Order].[OrderID], [o#Order].[CustomerID], [o#Order].[EmployeeID], [o#Order].[OrderDate]
|
|
FROM [Order Details] AS [o]
|
|
INNER JOIN [Orders] AS [o#Order] ON [o].[OrderID] = [o#Order].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_join_clause_with_order_by_and_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[City], [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
INNER JOIN [Orders] AS [o0] ON [c0].[CustomerID] = [o0].[CustomerID]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[City], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_join_clause_with_order_by_and_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[City], [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
INNER JOIN [Orders] AS [o0] ON [c0].[CustomerID] = [o0].[CustomerID]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[City], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_dependent_already_tracked_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_dependent_already_tracked_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_complex_predicate_not_matching_ins2() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI') AND [c].[CustomerID] NOT IN ('ALFKI', 'ABCDE')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Contains_Column() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (Instr([c].[ContactName], [c].[ContactName]) > 0) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Anonymous_member_distinct_where() :
|
|
AssertSql(
|
|
@"SELECT [t].[CustomerID]
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Contains_Identity() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (Instr([c].[ContactName], [c].[ContactName]) > 0) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_null_coalesce_operator() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(IsNull([c].[Region]), 'ZZ', [c].[Region])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_reversed() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE 'London' = [c].[City]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_concat_with_navigation2() :
|
|
AssertSql(
|
|
@"SELECT ([o#Customer].[City] + ' ') + [o#Customer].[City]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_Where_Count() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_EndsWith_Literal() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE RIGHT([c].[ContactName], LEN('b')) = 'b'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_dependent_already_tracked(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_join_clause_with_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
INNER JOIN [Orders] AS [o0] ON [c0].[CustomerID] = [o0].[CustomerID]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_join_clause_with_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
INNER JOIN [Orders] AS [o0] ON [c0].[CustomerID] = [o0].[CustomerID]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation_Equals_Navigation() :
|
|
AssertSql(
|
|
@"SELECT [o1].[OrderID], [o1].[CustomerID], [o1].[EmployeeID], [o1].[OrderDate], [o2].[OrderID], [o2].[CustomerID], [o2].[EmployeeID], [o2].[OrderDate]
|
|
FROM [Orders] AS [o1]
|
|
, [Orders] AS [o2]
|
|
WHERE ([o1].[CustomerID] = [o2].[CustomerID]) OR ([o1].[CustomerID] IS NULL AND [o2].[CustomerID] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Collection_where_nav_prop_all() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE NOT EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE ([c].[CustomerID] = [o].[CustomerID]) AND (([o].[CustomerID] <> 'ALFKI') OR [o].[CustomerID] IS NULL))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.SelectMany_projection2() :
|
|
AssertSql(
|
|
@"SELECT [e1].[City], [e2].[Country], [e3].[FirstName]
|
|
FROM [Employees] AS [e1]
|
|
, [Employees] AS [e2]
|
|
, [Employees] AS [e3]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_static_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__StaticFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__StaticFieldValue_0",
|
|
//
|
|
@"@__StaticFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__StaticFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested_negated3() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE NOT EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A')) AND (([c].[City] <> 'London') OR [c].[City] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_subquery_involving_join_binds_to_correct_table() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] > 11000) AND [o].[OrderID] IN (
|
|
SELECT [od].[OrderID]
|
|
FROM [Order Details] AS [od]
|
|
INNER JOIN [Products] AS [od#Product] ON [od].[ProductID] = [od#Product].[ProductID]
|
|
WHERE [od#Product].[ProductName] = 'Chai'
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_order_by_non_key_with_first_or_default(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CompanyName] DESC, [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID], [c0].[CompanyName]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CompanyName] DESC, [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CompanyName] DESC, [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.GroupJoin_with_nav_projected_in_subquery_when_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [od0].[OrderID], [od0].[ProductID], [od0].[Discount], [od0].[Quantity], [od0].[UnitPrice], [od#Product0].[ProductID], [od#Product0].[Discontinued], [od#Product0].[ProductName], [od#Product0].[UnitPrice], [od#Product0].[UnitsInStock]
|
|
FROM [Order Details] AS [od0]
|
|
INNER JOIN [Products] AS [od#Product0] ON [od0].[ProductID] = [od#Product0].[ProductID]",
|
|
//
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate], [o#Customer0].[CustomerID], [o#Customer0].[Address], [o#Customer0].[City], [o#Customer0].[CompanyName], [o#Customer0].[ContactName], [o#Customer0].[ContactTitle], [o#Customer0].[Country], [o#Customer0].[Fax], [o#Customer0].[Phone], [o#Customer0].[PostalCode], [o#Customer0].[Region]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_collection_navigation_simple() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] LIKE 'A' + '%' AND (LEFT([c0].[CustomerID], LEN('A')) = 'A')
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_of_type_kiwi() :
|
|
AssertSql(
|
|
@"SELECT [k].[Species], [k].[CountryId], [k].[Discriminator], [k].[Name], [k].[EagleId], [k].[IsFlightless], [k].[FoundOn]
|
|
FROM [Animal] AS [k]
|
|
WHERE ([k].[Discriminator] = 'Kiwi') AND ([k].[CountryId] = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_of_type_bird_first() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [b].[Species], [b].[CountryId], [b].[Discriminator], [b].[Name], [b].[EagleId], [b].[IsFlightless], [b].[Group], [b].[FoundOn]
|
|
FROM [Animal] AS [b]
|
|
WHERE [b].[Discriminator] IN ('Kiwi', 'Eagle') AND ([b].[CountryId] = 1)
|
|
ORDER BY [b].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_filter_reordered(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_of_type_bird_predicate() :
|
|
AssertSql(
|
|
@"SELECT [b].[Species], [b].[CountryId], [b].[Discriminator], [b].[Name], [b].[EagleId], [b].[IsFlightless], [b].[Group], [b].[FoundOn]
|
|
FROM [Animal] AS [b]
|
|
WHERE ([b].[Discriminator] IN ('Kiwi', 'Eagle') AND ([b].[CountryId] = 1)) AND ([b].[CountryId] = 1)
|
|
ORDER BY [b].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Singleton_Navigation_With_Member_Access() :
|
|
AssertSql(
|
|
@"SELECT [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City] AS [B], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE ([o#Customer].[City] = 'Seattle') AND (([o#Customer].[Phone] <> '555 555 5555') OR [o#Customer].[Phone] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Navigation() :
|
|
AssertSql(
|
|
@"SELECT [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersJetTest.Compiled_query() :
|
|
AssertSql(
|
|
@"@__customerID='BERGS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = @__customerID",
|
|
//
|
|
@"@__customerID='BLAUS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = @__customerID");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Join_with_nav_in_orderby_in_subquery_when_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [od0].[OrderID], [od0].[ProductID], [od0].[Discount], [od0].[Quantity], [od0].[UnitPrice], [od#Product0].[ProductID], [od#Product0].[Discontinued], [od#Product0].[ProductName], [od#Product0].[UnitPrice], [od#Product0].[UnitsInStock]
|
|
FROM [Order Details] AS [od0]
|
|
INNER JOIN [Products] AS [od#Product0] ON [od0].[ProductID] = [od#Product0].[ProductID]",
|
|
//
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate], [o#Customer0].[CustomerID], [o#Customer0].[Address], [o#Customer0].[City], [o#Customer0].[CompanyName], [o#Customer0].[ContactName], [o#Customer0].[ContactTitle], [o#Customer0].[Country], [o#Customer0].[Fax], [o#Customer0].[Phone], [o#Customer0].[PostalCode], [o#Customer0].[Region]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation_Contains() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE Instr([o#Customer].[City], 'Sea') > 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE [o#Customer].[City] = 'Seattle'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Where_nav_prop_group_by() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
INNER JOIN [Orders] AS [od#Order] ON [od].[OrderID] = [od#Order].[OrderID]
|
|
WHERE [od#Order].[CustomerID] = 'ALFKI'
|
|
ORDER BY [od].[Quantity]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersJetTest.Include_query_opt_out() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_select_many() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
, [Employees] AS [e]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_and_collection(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"SELECT [o#OrderDetails].[OrderID], [o#OrderDetails].[ProductID], [o#OrderDetails].[Discount], [o#OrderDetails].[Quantity], [o#OrderDetails].[UnitPrice]
|
|
FROM [Order Details] AS [o#OrderDetails]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [o0].[OrderID]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]
|
|
) AS [t] ON [o#OrderDetails].[OrderID] = [t].[OrderID]
|
|
ORDER BY [t].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.LastOrDefault() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_list_inline() : line() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 6232
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Project_single_entity_value_subquery_works() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_and_collection(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"SELECT [o#OrderDetails].[OrderID], [o#OrderDetails].[ProductID], [o#OrderDetails].[Discount], [o#OrderDetails].[Quantity], [o#OrderDetails].[UnitPrice]
|
|
FROM [Order Details] AS [o#OrderDetails]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [o0].[OrderID]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]
|
|
) AS [t] ON [o#OrderDetails].[OrderID] = [t].[OrderID]
|
|
ORDER BY [t].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_when_groupby(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[City], [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[City], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_when_groupby(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[City], [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[City], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_last_no_orderby(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID] DESC",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID] DESC
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_last_no_orderby(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID] DESC",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID] DESC
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_order_by_non_key(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[City], [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[City], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Join_with_nav_in_predicate_in_subquery_when_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [od0].[OrderID], [od0].[ProductID], [od0].[Discount], [od0].[Quantity], [od0].[UnitPrice], [od#Product0].[ProductID], [od#Product0].[Discontinued], [od#Product0].[ProductName], [od#Product0].[UnitPrice], [od#Product0].[UnitsInStock]
|
|
FROM [Order Details] AS [od0]
|
|
INNER JOIN [Products] AS [od#Product0] ON [od0].[ProductID] = [od#Product0].[ProductID]",
|
|
//
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate], [o#Customer0].[CustomerID], [o#Customer0].[Address], [o#Customer0].[City], [o#Customer0].[CompanyName], [o#Customer0].[ContactName], [o#Customer0].[ContactTitle], [o#Customer0].[Country], [o#Customer0].[Fax], [o#Customer0].[Phone], [o#Customer0].[PostalCode], [o#Customer0].[Region]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_principal_already_tracked_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_principal_already_tracked_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation_Multiple_Access() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE ([o#Customer].[City] = 'Seattle') AND (([o#Customer].[Phone] <> '555 555 5555') OR [o#Customer].[Phone] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_dependent_already_tracked(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_dependent_already_tracked(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Collection_select_nav_prop_first_or_default() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BERGS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BLAUS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BLONP' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BOLID' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]");
|
|
|
|
Output truncated.
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested_negated2() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (([c].[City] <> 'London') OR [c].[City] IS NULL) AND NOT EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_subquery_projection() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT TOP @__p_0 [c].[City]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_arg_expression() :
|
|
AssertSql(
|
|
@"SELECT AVG(CDbl(IIf(IsNull([o].[OrderID] + [o].[OrderID]),0,[o].[OrderID] + [o].[OrderID])))
|
|
FROM [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_negated_twice() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation_Null_Deep() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
LEFT JOIN [Employees] AS [e#Manager] ON [e].[ReportsTo] = [e#Manager].[EmployeeID]
|
|
WHERE [e#Manager].[ReportsTo] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_count_using_DTO() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID] AS [Id], (
|
|
SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE [c].[CustomerID] = [o].[CustomerID]
|
|
) AS [Count]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_conditional_order_by(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(
|
|
[c].[CustomerID] LIKE 'S' + '%' AND (LEFT([c].[CustomerID], LEN('S')) = 'S'),
|
|
1,
|
|
2
|
|
), [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID], IIf(
|
|
[c0].[CustomerID] LIKE 'S' + '%' AND (LEFT([c0].[CustomerID], LEN('S')) = 'S'),
|
|
1,
|
|
2
|
|
) AS [c]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[c], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Anonymous_complex_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] + [c].[City] AS [A]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[A] LIKE 'A' + '%' AND (LEFT([t].[A], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_conditional_order_by(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(
|
|
[c].[CustomerID] LIKE 'S' + '%' AND (LEFT([c].[CustomerID], LEN('S')) = 'S'),
|
|
1,
|
|
2
|
|
), [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID], IIf(
|
|
[c0].[CustomerID] LIKE 'S' + '%' AND (LEFT([c0].[CustomerID], LEN('S')) = 'S'),
|
|
1,
|
|
2
|
|
) AS [c]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[c], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_EndsWith_Column() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (RIGHT([c].[ContactName], LEN([c].[ContactName])) = [c].[ContactName]) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Substring_with_client_eval() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[ContactName]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bitwise_and_with_logical_and() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ((IIf(
|
|
[c].[CustomerID] = 'ALFKI',
|
|
True,
|
|
False
|
|
) BAND IIf(
|
|
[c].[CustomerID] = 'ANATR',
|
|
True,
|
|
False
|
|
)) = True) AND ([c].[CustomerID] = 'ANTON')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_null_coalesce_operator() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[CompanyName], IIf(IsNull([c].[Region]), 'ZZ', [c].[Region]) AS [Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [Region]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Projection_null_coalesce_operator() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[CompanyName], IIf(IsNull([c].[Region]), 'ZZ', [c].[Region]) AS [Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_parameter() :
|
|
AssertSql(
|
|
@"@__prm_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE @__prm_0 = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Null_conditional_deep() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE CInt(IIf(IsNull(LEN([c].[CustomerID])),0,LEN([c].[CustomerID]))) = 5");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_not_in_optimization4() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE [c].[City] NOT IN ('London', 'Berlin', 'Seattle', 'Lisboa')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_principal_already_tracked(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_concat_with_navigation1() :
|
|
AssertSql(
|
|
@"SELECT ([o].[CustomerID] + ' ') + [o#Customer].[City]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_member_distinct_where() :
|
|
AssertSql(
|
|
@"SELECT [t].[Property]
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] AS [Property]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[Property] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Queryable_simple_anonymous_subquery() :
|
|
AssertSql(
|
|
@"@__p_0='91'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_with_skip(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='80'
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName], [c].[CustomerID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_with_skip(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='80'
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName], [c].[CustomerID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Sum_on_float_column_in_subquery() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], (
|
|
SELECT CSng(IIf(IsNull(SUM([od].[Discount])),0,SUM([od].[Discount])))
|
|
FROM [Order Details] AS [od]
|
|
WHERE [o].[OrderID] = [od].[OrderID]
|
|
) AS [Sum]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderID] < 10300");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_multi_level3() :
|
|
AssertSql(
|
|
@"SELECT (
|
|
SELECT TOP 1 [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND ([c].[CustomerID] = [o].[CustomerID])
|
|
) AS [OrderDates]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.SelectMany_Count() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Customers] AS [c]
|
|
, [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_shadow_subquery_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[Title] = (
|
|
SELECT TOP 1 [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
ORDER BY [e2].[Title]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_Where_Count() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_multi_level_reference_and_collection_predicate(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE [o].[OrderID] = 10248
|
|
ORDER BY [o#Customer].[CustomerID]",
|
|
//
|
|
@"SELECT [o#Customer#Orders].[OrderID], [o#Customer#Orders].[CustomerID], [o#Customer#Orders].[EmployeeID], [o#Customer#Orders].[OrderDate]
|
|
FROM [Orders] AS [o#Customer#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [t].*
|
|
FROM (
|
|
SELECT TOP 1 [o#Customer0].[CustomerID]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]
|
|
WHERE [o0].[OrderID] = 10248
|
|
ORDER BY [o#Customer0].[CustomerID]
|
|
) AS [t]
|
|
) AS [t0] ON [o#Customer#Orders].[CustomerID] = [t0].[CustomerID]
|
|
ORDER BY [t0].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_false() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_last(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CompanyName] DESC, [c].[CustomerID] DESC",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID], [c0].[CompanyName]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CompanyName] DESC, [c0].[CustomerID] DESC
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CompanyName] DESC, [t].[CustomerID] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_member_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] AS [Property]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[Property] LIKE 'A' + '%' AND (LEFT([t].[Property], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_where_skip_take_projection(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='1'
|
|
@__p_1='2'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [od#Order].[CustomerID]
|
|
FROM [Order Details] AS [od]
|
|
INNER JOIN [Orders] AS [od#Order] ON [od].[OrderID] = [od#Order].[OrderID]
|
|
WHERE [od].[Quantity] = 10
|
|
ORDER BY [od].[OrderID], [od].[ProductID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_where_skip_take_projection(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='1'
|
|
@__p_1='2'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [od#Order].[CustomerID]
|
|
FROM [Order Details] AS [od]
|
|
INNER JOIN [Orders] AS [od#Order] ON [od].[OrderID] = [od#Order].[OrderID]
|
|
WHERE [od].[Quantity] = 10
|
|
ORDER BY [od].[OrderID], [od].[ProductID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_using_int_overload_on_mismatched_types() :
|
|
AssertSql(
|
|
@"@__shortPrm_0='1'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[EmployeeID] = @__shortPrm_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_EndsWith_Identity() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (RIGHT([c].[ContactName], LEN([c].[ContactName])) = [c].[ContactName]) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_de_morgan_and_optimizated() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ([p].[Discontinued] = False) OR ([p].[ProductID] >= 20)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_additional_from_clause_with_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c1]
|
|
, [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c0].[CustomerID]
|
|
FROM [Customers] AS [c10]
|
|
, [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_additional_from_clause_with_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c1]
|
|
, [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c0].[CustomerID]
|
|
FROM [Customers] AS [c10]
|
|
, [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_long_to_string() :
|
|
AssertSql(
|
|
@"SELECT Str([o].[OrderID]) AS [ShipName]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_no_arg() :
|
|
AssertSql(
|
|
@"SELECT AVG(CDbl(IIf(IsNull([o].[OrderID]),0,[o].[OrderID])))
|
|
FROM [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Distinct_Take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT TOP @__p_0 [t].[OrderID], [t].[CustomerID], [t].[EmployeeID], [t].[OrderDate]
|
|
FROM (
|
|
SELECT DISTINCT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
) AS [t]
|
|
ORDER BY [t].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_sql_injection() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ALFKI', 'ABC'')); GO; DROP TABLE Orders; GO; --', 'ALFKI', 'ABCDE')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested3() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A')) AND (([c].[City] <> 'London') OR [c].[City] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.SelectMany_projection1() :
|
|
AssertSql(
|
|
@"SELECT [e1].[City], [e2].[Country]
|
|
FROM [Employees] AS [e1]
|
|
, [Employees] AS [e2]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_EndsWith_MethodCall() :
|
|
AssertSql(
|
|
@"@__LocalMethod2_0='m' (Nullable = false) (Size = 1)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (RIGHT([c].[ContactName], LEN(@__LocalMethod2_0)) = @__LocalMethod2_0) OR (@__LocalMethod2_0 = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_0",
|
|
//
|
|
@"@__city_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_expression_invoke() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Anonymous_member_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[CustomerID] LIKE 'A' + '%' AND (LEFT([t].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_Customers_Orders_Projection_With_String_Concat_Skip_Take() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
@__p_1='5'
|
|
|
|
SELECT TOP @__p_1+@__p_0 ([c].[ContactName] + ' ') + [c].[ContactTitle] AS [Contact], [o].[OrderID]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_select_many_or3() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE [c].[City] IN ('London', 'Berlin', 'Seattle')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_compared_to_binary_expression() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = IIf(
|
|
[p].[ProductID] > 50,
|
|
True,
|
|
False
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Null_conditional_simple() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_comparison_to_nullable_bool() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE RIGHT([c].[CustomerID], LEN('KI')) = 'KI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bitwise_or_with_logical_or() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ((IIf(
|
|
[c].[CustomerID] = 'ALFKI',
|
|
True,
|
|
False
|
|
) BOR IIf(
|
|
[c].[CustomerID] = 'ANATR',
|
|
True,
|
|
False
|
|
)) = True) OR ([c].[CustomerID] = 'ANTON')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_subquery_and_local_array_closure() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Customers] AS [c1]
|
|
WHERE [c1].[City] IN ('London', 'Buenos Aires') AND ([c1].[CustomerID] = [c].[CustomerID]))",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Customers] AS [c1]
|
|
WHERE [c1].[City] IN ('London') AND ([c1].[CustomerID] = [c].[CustomerID]))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_many_cross_join_same_collection() :
|
|
AssertSql(
|
|
@"SELECT [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region]
|
|
FROM [Customers] AS [c]
|
|
, [Customers] AS [c0]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_arg() :
|
|
AssertSql(
|
|
@"SELECT AVG(CDbl(IIf(IsNull([o].[OrderID]),0,[o].[OrderID])))
|
|
FROM [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_bitwise_or_with_logical_or() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], IIf(
|
|
((IIf(
|
|
[c].[CustomerID] = 'ALFKI',
|
|
True,
|
|
False
|
|
) BOR IIf(
|
|
[c].[CustomerID] = 'ANATR',
|
|
True,
|
|
False
|
|
)) = True) OR ([c].[CustomerID] = 'ANTON'),
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_LastOrDefault() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Contains_Literal() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE Instr([c].[ContactName], 'M') > 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_on_mismatched_types_nullable_int_long() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True",
|
|
//
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_false() :
|
|
AssertSql(
|
|
@"@__flag_0='False'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ((@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)) OR ((@__flag_0 <> True) AND ([p].[UnitsInStock] < 20))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_division_on_decimal_no_significant_digits() :
|
|
AssertSql(
|
|
@"SELECT AVG(CCur(IIf(IsNull([od].[Quantity] / 2.0),0,[od].[Quantity] / 2.0)))
|
|
FROM [Order Details] AS [od]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_concat_string_int_comparison1() :
|
|
AssertSql(
|
|
@"@__i_0='10'
|
|
|
|
SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[CustomerID] + (@__i_0&"""")) = [c].[CompanyName]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Single_Predicate() :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_simple_parameterized() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_complex_predicate_or() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI', 'ALFKI', 'ABCDE')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_select_many_and() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE (([c].[City] = 'London') AND ([c].[Country] = 'UK')) AND (([e].[City] = 'London') AND ([e].[Country] = 'UK'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_with_multiple_conditions_still_uses_exists() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[City] = 'London') AND EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[EmployeeID] = 1) AND ([c].[CustomerID] = [o].[CustomerID]))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_on_float_column_in_subquery() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderID] < 10300",
|
|
//
|
|
@"@_outer_OrderID='10248'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10249'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10250'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10251'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10252'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10253'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10254'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10255'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]");
|
|
|
|
Output truncated.
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_other_to_string() :
|
|
AssertSql(
|
|
@"SELECT Str([o].[OrderDate]) AS [ShipName]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_on_float_column() :
|
|
AssertSql(
|
|
@"SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od].[Discount]),0,[od].[Discount])))),0,AVG(CSng(IIf(IsNull([od].[Discount]),0,[od].[Discount])))))
|
|
FROM [Order Details] AS [od]
|
|
WHERE [od].[ProductID] = 1");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_join_select() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_sin() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (SIN([od].[Discount]) > 0E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_concat_string_int_comparison2() :
|
|
AssertSql(
|
|
@"@__i_0='10'
|
|
|
|
SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE ((@__i_0&"""") + [c].[CustomerID]) = [c].[CompanyName]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_skip_take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
@__p_1='8'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactTitle], [c].[ContactName]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_concat_string_int_comparison3() :
|
|
AssertSql(
|
|
@"@__j_1='21'
|
|
@__i_0='10'
|
|
|
|
SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE ((((@__i_0 + 20&"""") + [c].[CustomerID]) + (@__j_1&"""")) + (42&"""")) = [c].[CompanyName]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_in_optimization_multiple() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE ([c].[City] IN ('London', 'Berlin') OR ([c].[CustomerID] = 'ALFKI')) OR ([c].[CustomerID] = 'ABCDE')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_multi_level6() :
|
|
AssertSql(
|
|
@"SELECT (
|
|
SELECT TOP 1 (
|
|
SELECT TOP 1 [od].[ProductID]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] <> CInt(IIf(IsNull(LEN([c].[CustomerID])),0,LEN([c].[CustomerID])))) AND ([o].[OrderID] = [od].[OrderID])
|
|
)
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND ([c].[CustomerID] = [o].[CustomerID])
|
|
) AS [Order]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_negated_boolean_expression_compared_to_another_negated_boolean_expression() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE IIf(
|
|
[p].[ProductID] > 50,
|
|
True,
|
|
False
|
|
) = IIf(
|
|
[p].[ProductID] > 20,
|
|
True,
|
|
False
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_StartsWith_Identity() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[ContactName] LIKE [c].[ContactName] + '%' AND (LEFT([c].[ContactName], LEN([c].[ContactName])) = [c].[ContactName])) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OfType_Select() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [o#Customer].[City]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
ORDER BY [o].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_complex_distinct_where() :
|
|
AssertSql(
|
|
@"SELECT [t].[Property]
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] + [c].[City] AS [Property]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[Property] = 'ALFKIBerlin'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_select_many_or_with_parameter() :
|
|
AssertSql(
|
|
@"@__lisboa_1='Lisboa' (Nullable = false) (Size = 6)
|
|
@__london_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE [c].[City] IN (@__london_0, 'Berlin', 'Seattle', @__lisboa_1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.SelectMany_entity_deep() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title], [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title], [e3].[EmployeeID], [e3].[City], [e3].[Country], [e3].[FirstName], [e3].[ReportsTo], [e3].[Title], [e4].[EmployeeID], [e4].[City], [e4].[Country], [e4].[FirstName], [e4].[ReportsTo], [e4].[Title]
|
|
FROM [Employees] AS [e1]
|
|
, [Employees] AS [e2]
|
|
, [Employees] AS [e3]
|
|
, [Employees] AS [e4]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_true() :
|
|
AssertSql(
|
|
@"@__flag_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ((@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)) OR ((@__flag_0 <> True) AND ([p].[UnitsInStock] < 20))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_complex_predicate_not_matching_ins1() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ALFKI', 'ABCDE') OR [c].[CustomerID] NOT IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_client_side_negated() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_multi_level() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 3 [o].[OrderDate] AS [Date]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND (@_outer_CustomerID = [o].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 3 [o].[OrderDate] AS [Date]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND (@_outer_CustomerID = [o].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 3 [o].[OrderDate] AS [Date]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND (@_outer_CustomerID = [o].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 3 [o].[OrderDate] AS [Date]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND (@_outer_CustomerID = [o].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_SelectMany() :
|
|
AssertSql(
|
|
@"SELECT [c].[ContactName], [t].[OrderID]
|
|
FROM [Customers] AS [c]
|
|
, (
|
|
SELECT TOP 3 [o].*
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]
|
|
) AS [t]
|
|
WHERE [c].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.IsNullOrEmpty_in_projection() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID] AS [Id], IIf(
|
|
[c].[Region] IS NULL OR ([c].[Region] = ''),
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_shadow_projection() :
|
|
AssertSql(
|
|
@"SELECT [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[Title] = 'Sales Representative'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_closure_via_query_cache_nullable_type() :
|
|
AssertSql(
|
|
@"@__reportsTo_0='2'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__reportsTo_0",
|
|
//
|
|
@"@__reportsTo_0='5'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__reportsTo_0",
|
|
//
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_nested_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_Nested_InstanceFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstanceFieldValue_0",
|
|
//
|
|
@"@__city_Nested_InstanceFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstanceFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_DefaultIfEmpty_Where() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Customers] AS [c]
|
|
LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [o].[OrderID] IS NOT NULL AND ([o].[CustomerID] = 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_constant_is_null() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested_negated() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE NOT EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Last() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_method_call_nullable_type_reverse_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_NullableInt_0='1'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[EmployeeID] > @__city_NullableInt_0",
|
|
//
|
|
@"@__city_NullableInt_0='5'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[EmployeeID] > @__city_NullableInt_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_subquery_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__customerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[CustomerID] = @__customerID_0) AND ([o].[CustomerID] = [c].[CustomerID]))",
|
|
//
|
|
@"@__customerID_0='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[CustomerID] = @__customerID_0) AND ([o].[CustomerID] = [c].[CustomerID]))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_exp() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (EXP([od].[Discount]) > 1E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Skip_Take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
@__p_1='10'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_de_morgan_or_optimizated() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ([p].[Discontinued] = False) AND ([p].[ProductID] >= 20)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_bitwise_and() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], IIf(
|
|
[c].[CustomerID] = 'ALFKI',
|
|
True,
|
|
False
|
|
) BAND IIf(
|
|
[c].[CustomerID] = 'ANATR',
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title]
|
|
FROM [Employees] AS [e1]
|
|
WHERE [e1].[FirstName] = (
|
|
SELECT TOP 1 [e].[FirstName]
|
|
FROM [Employees] AS [e]
|
|
ORDER BY [e].[EmployeeID]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_scalar_primitive_after_take() :
|
|
AssertSql(
|
|
@"@__p_0='9'
|
|
|
|
SELECT TOP @__p_0 [e].[EmployeeID]
|
|
FROM [Employees] AS [e]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.FirstOrDefault_inside_subquery_gets_server_evaluated() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[CustomerID] = 'ALFKI') AND ((
|
|
SELECT TOP 1 [o].[CustomerID]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[CustomerID] = 'ALFKI') AND ([c].[CustomerID] = [o].[CustomerID])
|
|
) = 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_orderby_select_many() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
, [Orders] AS [o]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_coalesce() :
|
|
AssertSql(
|
|
@"SELECT AVG(CCur(IIf(IsNull(IIf(IsNull([p].[UnitPrice]), 0.0, [p].[UnitPrice])),0,IIf(IsNull([p].[UnitPrice]), 0.0, [p].[UnitPrice]))))
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[ProductID] < 40");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bitwise_and_with_logical_or() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ((IIf(
|
|
[c].[CustomerID] = 'ALFKI',
|
|
True,
|
|
False
|
|
) BAND IIf(
|
|
[c].[CustomerID] = 'ANATR',
|
|
True,
|
|
False
|
|
)) = True) OR ([c].[CustomerID] = 'ANTON')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.IsNullOrWhiteSpace_in_predicate() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[Region] IS NULL OR (LTRIM(RTRIM([c].[Region])) = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_array_closure() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI')",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Subquery_is_null_translated_correctly() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (
|
|
SELECT TOP 1 [o].[CustomerID]
|
|
FROM [Orders] AS [o]
|
|
WHERE [c].[CustomerID] = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID] DESC
|
|
) IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_division_on_decimal() :
|
|
AssertSql(
|
|
@"SELECT AVG(CCur(IIf(IsNull([od].[Quantity] / 2.09),0,[od].[Quantity] / 2.09)))
|
|
FROM [Order Details] AS [od]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_multi_level4() :
|
|
AssertSql(
|
|
@"SELECT (
|
|
SELECT TOP 1 (
|
|
SELECT COUNT(*)
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] > 10) AND ([o].[OrderID] = [od].[OrderID])
|
|
)
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND ([c].[CustomerID] = [o].[CustomerID])
|
|
) AS [Order]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Handle_materialization_properly_when_more_than_two_query_sources_are_involved() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
, [Orders] AS [o]
|
|
, [Employees] AS [e]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Query_expression_with_to_string_and_contains() :
|
|
AssertSql(
|
|
@"SELECT [o].[CustomerID]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL AND (Instr(Str([o].[EmployeeID]), '10') > 0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_bitwise_or() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], IIf(
|
|
[c].[CustomerID] = 'ALFKI',
|
|
True,
|
|
False
|
|
) BOR IIf(
|
|
[c].[CustomerID] = 'ANATR',
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_simple_projection() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[City]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_static_property_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__StaticPropertyValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__StaticPropertyValue_0",
|
|
//
|
|
@"@__StaticPropertyValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__StaticPropertyValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_subquery_on_bool() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE 'Chai' IN (
|
|
SELECT [p2].[ProductName]
|
|
FROM [Products] AS [p2]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_Where_Subquery_Deep_First() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT TOP @__p_0 [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE (
|
|
SELECT TOP 1 (
|
|
SELECT TOP 1 [c].[City]
|
|
FROM [Customers] AS [c]
|
|
WHERE [o].[CustomerID] = [c].[CustomerID]
|
|
)
|
|
FROM [Orders] AS [o]
|
|
WHERE [od].[OrderID] = [o].[OrderID]
|
|
) = 'Seattle'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_client_deep_inside_predicate_and_server_top_level() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <> 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Subquery_is_not_null_translated_correctly() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (
|
|
SELECT TOP 1 [o].[CustomerID]
|
|
FROM [Orders] AS [o]
|
|
WHERE [c].[CustomerID] = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID] DESC
|
|
) IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_false() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] NOT IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_parameter_compared_to_binary_expression() :
|
|
AssertSql(
|
|
@"@__prm_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE IIf(
|
|
[p].[ProductID] > 50,
|
|
True,
|
|
False
|
|
) <> @__prm_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Last_when_no_order_by() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_distinct_average() :
|
|
AssertSql(
|
|
@"SELECT AVG(CDbl(IIf(IsNull([t].[OrderID]),0,[t].[OrderID])))
|
|
FROM (
|
|
SELECT DISTINCT [o].[OrderID]
|
|
FROM [Orders] AS [o]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_anonymous_conditional_expression() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], IIf(
|
|
[p].[UnitsInStock] > 0,
|
|
True,
|
|
False
|
|
) AS [IsAvailable]
|
|
FROM [Products] AS [p]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_not_bool_member_compared_to_binary_expression() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] <> IIf(
|
|
[p].[ProductID] > 50,
|
|
True,
|
|
False
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_anonymous_constant_in_expression() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], CInt(IIf(IsNull(LEN([c].[CustomerID])),0,LEN([c].[CustomerID]))) + 5 AS [Expression]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_orderby_join_select() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] <> 'ALFKI'
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_DTO_with_member_init_distinct_in_subquery_translated_to_server() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[Count], [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM (
|
|
SELECT DISTINCT [o].[CustomerID] AS [Id], [o].[OrderID] AS [Count]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderID] < 10300
|
|
) AS [t]
|
|
, [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = [t].[Id]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Selected_column_can_coalesce() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(IsNull([c].[Region]), 'ZZ', [c].[Region])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_no_elements_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title]
|
|
FROM [Employees] AS [e1]
|
|
WHERE (
|
|
SELECT TOP 1 [e2].[EmployeeID]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = 42
|
|
) = 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_string_length() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE CInt(IIf(IsNull(LEN([c].[City])),0,LEN([c].[City]))) = 6");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_not_in_optimization1() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE (([c].[City] <> 'London') OR [c].[City] IS NULL) AND (([e].[City] <> 'London') OR [e].[City] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_cos() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (COS([od].[Discount]) > 0E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_not_in_optimization3() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE [c].[City] NOT IN ('London', 'Berlin', 'Seattle')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.SelectMany_simple2() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title], [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e2].[FirstName] AS [FirstName0]
|
|
FROM [Employees] AS [e1]
|
|
, [Customers] AS [c]
|
|
, [Employees] AS [e2]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested2() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (([c].[City] <> 'London') OR [c].[City] IS NULL) AND EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Count_with_predicate() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupBy_anonymous_with_where() :
|
|
AssertSql(
|
|
@"SELECT [c].[City], [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[Country] IN ('Argentina', 'Austria', 'Brazil', 'France', 'Germany', 'USA')
|
|
ORDER BY [c].[City]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_list_inline_closure_mix() : line_closure_mix() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 6242
|
|
AssertSql(
|
|
@"@__id_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', @__id_0)",
|
|
//
|
|
@"@__id_0='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', @__id_0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_closure_via_query_cache_nullable_type_reverse() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] IS NULL",
|
|
//
|
|
@"@__reportsTo_0='5'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__reportsTo_0",
|
|
//
|
|
@"@__reportsTo_0='2'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__reportsTo_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_property_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_InstancePropertyValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstancePropertyValue_0",
|
|
//
|
|
@"@__city_InstancePropertyValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstancePropertyValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_select_many_or2() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE [c].[City] IN ('London', 'Berlin')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_null_is_not_null() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_Where_Count_with_predicate() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] > 10) AND (([o].[CustomerID] <> 'ALFKI') OR [o].[CustomerID] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.IsNullOrEmpty_negated_in_projection() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID] AS [Id], IIf(
|
|
[c].[Region] IS NOT NULL AND ([c].[Region] <> ''),
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OfType_Select_OfType_Select() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [o#Customer].[City]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
ORDER BY [o].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_Where_Subquery_Deep_Single() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE [od].[OrderID] = 10344",
|
|
//
|
|
@"@_outer_OrderID='10344'
|
|
|
|
SELECT TOP 2 [o0].[CustomerID]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_OrderID = [o0].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID1='WHITC' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 2 [c2].[City]
|
|
FROM [Customers] AS [c2]
|
|
WHERE @_outer_CustomerID1 = [c2].[CustomerID]",
|
|
//
|
|
@"@_outer_OrderID='10344'
|
|
|
|
SELECT TOP 2 [o0].[CustomerID]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_OrderID = [o0].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID1='WHITC' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 2 [c2].[City]
|
|
FROM [Customers] AS [c2]
|
|
WHERE @_outer_CustomerID1 = [c2].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_nested_property_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_Nested_InstancePropertyValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstancePropertyValue_0",
|
|
//
|
|
@"@__city_Nested_InstancePropertyValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstancePropertyValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_and_parameter_compared_to_binary_expression_nested() :
|
|
AssertSql(
|
|
@"@__prm_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = IIf(
|
|
IIf(
|
|
[p].[ProductID] > 50,
|
|
True,
|
|
False
|
|
) <> @__prm_0,
|
|
True,
|
|
False
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_Last() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Contains_MethodCall() :
|
|
AssertSql(
|
|
@"@__LocalMethod1_0='M' (Nullable = false) (Size = 1)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (Instr([c].[ContactName], @__LocalMethod1_0) > 0) OR (@__LocalMethod1_0 = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_compare_with_parameter() :
|
|
AssertSql(
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] > @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] < @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] >= @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] >= @__customer_CustomerID_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_bitwise_and_with_logical_and() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], IIf(
|
|
((IIf(
|
|
[c].[CustomerID] = 'ALFKI',
|
|
True,
|
|
False
|
|
) BAND IIf(
|
|
[c].[CustomerID] = 'ANATR',
|
|
True,
|
|
False
|
|
)) = True) AND ([c].[CustomerID] = 'ANTON'),
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Anonymous_complex_distinct_where() :
|
|
AssertSql(
|
|
@"SELECT [t].[A]
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] + [c].[City] AS [A]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[A] = 'ALFKIBerlin'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_equals_constant() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_InstanceFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstanceFieldValue_0",
|
|
//
|
|
@"@__city_InstanceFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstanceFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_binary_expression() :
|
|
AssertSql(
|
|
@"SELECT AVG(CDbl(IIf(IsNull([o].[OrderID] * 2),0,[o].[OrderID] * 2)))
|
|
FROM [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_on_matched_nullable_int_types() :
|
|
AssertSql(
|
|
@"@__nullableIntPrm_0='2'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE @__nullableIntPrm_0 = [e].[ReportsTo]",
|
|
//
|
|
@"@__nullableIntPrm_0='2'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__nullableIntPrm_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_OrderBy_Count() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_with_false_as_result_false() :
|
|
AssertSql(
|
|
@"@__flag_0='False'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE (@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Compare_multi_predicate() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] >= 'ALFKI' AND [c].[CustomerID] < 'CACTU'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[ContactTitle] = 'Owner' AND [c].[Country] <> 'USA'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_complex_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] + [c].[City] AS [Property]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[Property] LIKE 'A' + '%' AND (LEFT([t].[Property], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_with_false_as_result_true() :
|
|
AssertSql(
|
|
@"@__flag_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE (@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_new_instance_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__InstanceFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__InstanceFieldValue_0",
|
|
//
|
|
@"@__InstanceFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__InstanceFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_compare_null() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] IS NULL AND ([c].[Country] = 'UK')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bitwise_and() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (IIf(
|
|
[c].[CustomerID] = 'ALFKI',
|
|
True,
|
|
False
|
|
) BAND IIf(
|
|
[c].[CustomerID] = 'ANATR',
|
|
True,
|
|
False
|
|
)) = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Entity_equality_local() :
|
|
AssertSql(
|
|
@"@__local_0_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = @__local_0_CustomerID");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Queryable_simple_anonymous_projection_subquery() :
|
|
AssertSql(
|
|
@"@__p_0='91'
|
|
|
|
SELECT TOP @__p_0 [c].[City]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_false() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = False");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_comparison_operator() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(
|
|
[c].[Region] = 'ASK',
|
|
True,
|
|
False
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_multiple_elements_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title]
|
|
FROM [Employees] AS [e1]
|
|
WHERE (
|
|
SELECT TOP 1 [e2].[EmployeeID]
|
|
FROM [Employees] AS [e2]
|
|
WHERE ([e2].[EmployeeID] <> [e1].[ReportsTo]) OR [e1].[ReportsTo] IS NULL
|
|
) = 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_using_object_overload_on_mismatched_types() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.SelectMany_simple1() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title], [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Employees] AS [e]
|
|
, [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_complex_predicate_and() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ALFKI', 'ABCDE') AND [c].[CustomerID] IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Sum_on_float_column() :
|
|
AssertSql(
|
|
@"SELECT CSng(IIf(IsNull(SUM([od].[Discount])),0,SUM([od].[Discount])))
|
|
FROM [Order Details] AS [od]
|
|
WHERE [od].[ProductID] = 1");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_shadow() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_on_mismatched_types_nullable_long_nullable_int() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True",
|
|
//
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_StartsWith_Literal() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[ContactName] LIKE 'M' + '%' AND (LEFT([c].[ContactName], LEN('M')) = 'M')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_one_element_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title]
|
|
FROM [Employees] AS [e1]
|
|
WHERE (
|
|
SELECT TOP 1 [e2].[EmployeeID]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = [e1].[ReportsTo]
|
|
) = 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_bitwise_and_or() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], (IIf(
|
|
[c].[CustomerID] = 'ALFKI',
|
|
True,
|
|
False
|
|
) BAND IIf(
|
|
[c].[CustomerID] = 'ANATR',
|
|
True,
|
|
False
|
|
)) BOR IIf(
|
|
[c].[CustomerID] = 'ANTON',
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_false_shadow() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = False");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_tan() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (TAN([od].[Discount]) > 0E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_array_inline() : line() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 6212
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_conditional_operator_where_condition_null() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(
|
|
False = True,
|
|
'ZZ',
|
|
[c].[City]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Last_Predicate() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Entity_equality_local_inline() : line() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 173
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ANATR'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_multi_level2() :
|
|
AssertSql(
|
|
@"SELECT (
|
|
SELECT TOP 1 [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND ([c].[CustomerID] = [o].[CustomerID])
|
|
) AS [OrderDates]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_Where() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Environment_newline_is_funcletized() : line_is_funcletized() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 6638
|
|
AssertSql(
|
|
@"@__NewLine_0='
|
|
' (Nullable = false) (Size = 2)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (Instr([c].[CustomerID], @__NewLine_0) > 0) OR (@__NewLine_0 = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Compare_simple_one() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] > 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] < 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] >= 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] >= 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.LastOrDefault_Predicate() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_complex_negated_expression_optimized() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE (([p].[Discontinued] = False) AND ([p].[ProductID] < 60)) AND ([p].[ProductID] > 30)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_list_closure() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_additional_from_clause(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region]
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t]
|
|
, [Customers] AS [c2]
|
|
ORDER BY [c2].[CustomerID]",
|
|
//
|
|
@"@__p_0='5'
|
|
|
|
SELECT [c2#Orders].[OrderID], [c2#Orders].[CustomerID], [c2#Orders].[EmployeeID], [c2#Orders].[OrderDate]
|
|
FROM [Orders] AS [c2#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c20].[CustomerID]
|
|
FROM (
|
|
SELECT TOP @__p_0 [c0].*
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t0]
|
|
, [Customers] AS [c20]
|
|
) AS [t1] ON [c2#Orders].[CustomerID] = [t1].[CustomerID]
|
|
ORDER BY [t1].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_correlated_filtered_collection_works_with_caching() :
|
|
AssertSql(
|
|
@"SELECT [t].[GearNickName]
|
|
FROM [CogTag] AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_additional_from_clause(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region]
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t]
|
|
, [Customers] AS [c2]
|
|
ORDER BY [c2].[CustomerID]",
|
|
//
|
|
@"@__p_0='5'
|
|
|
|
SELECT [c2#Orders].[OrderID], [c2#Orders].[CustomerID], [c2#Orders].[EmployeeID], [c2#Orders].[OrderDate]
|
|
FROM [Orders] AS [c2#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c20].[CustomerID]
|
|
FROM (
|
|
SELECT TOP @__p_0 [c0].*
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t0]
|
|
, [Customers] AS [c20]
|
|
) AS [t1] ON [c2#Orders].[CustomerID] = [t1].[CustomerID]
|
|
ORDER BY [t1].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Compare_simple_zero() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <> 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] > 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] > 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Include_on_GroupJoin_SelectMany_DefaultIfEmpty_with_inheritance_and_coalesce_result() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank], [t].[Nickname], [t].[SquadId], [t].[AssignedCityName], [t].[CityOrBirthName], [t].[Discriminator], [t].[FullName], [t].[HasSoulPatch], [t].[LeaderNickname], [t].[LeaderSquadId], [t].[Rank]
|
|
FROM [Gear] AS [g]
|
|
LEFT JOIN (
|
|
SELECT [g2].*
|
|
FROM [Gear] AS [g2]
|
|
WHERE [g2].[Discriminator] = 'Officer'
|
|
) AS [t] ON [g].[LeaderNickname] = [t].[Nickname]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear')
|
|
ORDER BY [t].[FullName], [g].[FullName]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_ternary_operation_with_has_value_not_null() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
[w].[AmmunitionType] IS NOT NULL AND ([w].[AmmunitionType] = 1),
|
|
'Yes',
|
|
'No'
|
|
) AS [IsCartidge]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[AmmunitionType] IS NOT NULL AND ([w].[AmmunitionType] = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_Where_Count_with_predicate_client_eval_mixed() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[CustomerID] <> 'ALFKI') OR [o].[CustomerID] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_method_call_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__GetCity_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__GetCity_0",
|
|
//
|
|
@"@__GetCity_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__GetCity_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Include_on_GroupJoin_SelectMany_DefaultIfEmpty_with_complex_projection_result() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank], [t].[Nickname], [t].[SquadId], [t].[AssignedCityName], [t].[CityOrBirthName], [t].[Discriminator], [t].[FullName], [t].[HasSoulPatch], [t].[LeaderNickname], [t].[LeaderSquadId], [t].[Rank]
|
|
FROM [Gear] AS [g]
|
|
LEFT JOIN (
|
|
SELECT [g2].*
|
|
FROM [Gear] AS [g2]
|
|
WHERE [g2].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t] ON [g].[LeaderNickname] = [t].[Nickname]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear')
|
|
ORDER BY [g].[FullName], [t].[FullName]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Sum_with_optional_navigation_is_translated_to_sql() :
|
|
AssertSql(
|
|
@"SELECT SUM([g].[SquadId])
|
|
FROM [Gear] AS [g]
|
|
LEFT JOIN [CogTag] AS [g#Tag] ON ([g].[Nickname] = [g#Tag].[GearNickName]) AND ([g].[SquadId] = [g#Tag].[GearSquadId])
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g#Tag].[Note] <> 'Foo') OR [g#Tag].[Note] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_bitwise_or_multiple() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], (IIf(
|
|
[c].[CustomerID] = 'ALFKI',
|
|
True,
|
|
False
|
|
) BOR IIf(
|
|
[c].[CustomerID] = 'ANATR',
|
|
True,
|
|
False
|
|
)) BOR IIf(
|
|
[c].[CustomerID] = 'ANTON',
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_StartsWith_Column() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[ContactName] LIKE [c].[ContactName] + '%' AND (LEFT([c].[ContactName], LEN([c].[ContactName])) = [c].[ContactName])) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_bitwise_and_nullable_enum_with_null_constant() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE ([w].[AmmunitionType] BAND NULL) > 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_client_and_server_top_level() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <> 'AROUT'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Entity_equality_empty() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[Nickname] IS NULL AND ([g].[SquadId] = 0))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_query_all_birds() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle')
|
|
ORDER BY [a].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_select_many() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
, [Orders] AS [o]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_StartsWith_MethodCall() :
|
|
AssertSql(
|
|
@"@__LocalMethod1_0='M' (Nullable = false) (Size = 1)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[ContactName] LIKE @__LocalMethod1_0 + '%' AND (LEFT([c].[ContactName], LEN(@__LocalMethod1_0)) = @__LocalMethod1_0)) OR (@__LocalMethod1_0 = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Can_use_of_type_bird_predicate() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle') AND ([a].[CountryId] = 1)
|
|
ORDER BY [a].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition4() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT [t].[CustomerID], [t].[Address], [t].[City], [t].[CompanyName], [t].[ContactName], [t].[ContactTitle], [t].[Country], [t].[Fax], [t].[Phone], [t].[PostalCode], [t].[Region]
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t]",
|
|
//
|
|
@"SELECT 1
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID]",
|
|
//
|
|
@"SELECT [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region]
|
|
FROM [Customers] AS [c2]",
|
|
//
|
|
@"SELECT 1
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID]",
|
|
//
|
|
@"SELECT [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region]
|
|
FROM [Customers] AS [c2]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.InheritanceJetTest.Discriminator_used_when_projection_over_derived_type2() :
|
|
AssertSql(
|
|
@"SELECT [b].[IsFlightless], [b].[Discriminator]
|
|
FROM [Animal] AS [b]
|
|
WHERE [b].[Discriminator] IN ('Kiwi', 'Eagle')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Navigation_fk_based_inside_contains() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] IN ('ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_Where_OrderBy() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE ([o].[CustomerID] = 'ALFKI') OR ([c].[CustomerID] = 'ANATR')
|
|
ORDER BY [c].[City]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_alias_generation(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice], [o#Order].[OrderID], [o#Order].[CustomerID], [o#Order].[EmployeeID], [o#Order].[OrderDate]
|
|
FROM [Order Details] AS [o]
|
|
INNER JOIN [Orders] AS [o#Order] ON [o].[OrderID] = [o#Order].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_select_many_or() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE ([c].[City] = 'London') OR ([e].[City] = 'London')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_Distinct_Count() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [t].*
|
|
FROM (
|
|
SELECT TOP @__p_0 [o].*
|
|
FROM [Orders] AS [o]
|
|
) AS [t]
|
|
) AS [t0]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bitwise_or() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (IIf(
|
|
[c].[CustomerID] = 'ALFKI',
|
|
True,
|
|
False
|
|
) BOR IIf(
|
|
[c].[CustomerID] = 'ANATR',
|
|
True,
|
|
False
|
|
)) = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_join_clause_with_order_by_and_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[City], [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
INNER JOIN [Orders] AS [o0] ON [c0].[CustomerID] = [o0].[CustomerID]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[City], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_join_clause_with_order_by_and_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[City], [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
INNER JOIN [Orders] AS [o0] ON [c0].[CustomerID] = [o0].[CustomerID]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[City], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bitwise_or_with_logical_and() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ((IIf(
|
|
[c].[CustomerID] = 'ALFKI',
|
|
True,
|
|
False
|
|
) BOR IIf(
|
|
[c].[CustomerID] = 'ANATR',
|
|
True,
|
|
False
|
|
)) = True) AND ([c].[Country] = 'Germany')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_dependent_already_tracked_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_project_filter2() :
|
|
AssertSql(
|
|
@"SELECT [c].[City]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Lifting_when_subquery_nested_order_by_simple() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT [t0].[CustomerID]
|
|
FROM (
|
|
SELECT DISTINCT [t].[CustomerID]
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t]
|
|
, [Customers] AS [c2]
|
|
) AS [t0]",
|
|
//
|
|
@"SELECT [c1_Orders].[OrderID], [c1_Orders].[CustomerID], [c1_Orders].[EmployeeID], [c1_Orders].[OrderDate]
|
|
FROM [Orders] AS [c1_Orders]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersJetTest.Compiled_query() :
|
|
AssertSql(
|
|
@"@__customerID='BERGS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = @__customerID",
|
|
//
|
|
@"@__customerID='BLAUS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = @__customerID");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_dependent_already_tracked(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_complex_predicate_not_matching_ins2() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI') AND [c].[CustomerID] NOT IN ('ALFKI', 'ABCDE')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_dependent_already_tracked(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation_Equals_Navigation() :
|
|
AssertSql(
|
|
@"SELECT [o1].[OrderID], [o1].[CustomerID], [o1].[EmployeeID], [o1].[OrderDate], [o2].[OrderID], [o2].[CustomerID], [o2].[EmployeeID], [o2].[OrderDate]
|
|
FROM [Orders] AS [o1]
|
|
, [Orders] AS [o2]
|
|
WHERE ([o1].[CustomerID] = [o2].[CustomerID]) OR ([o1].[CustomerID] IS NULL AND [o2].[CustomerID] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Collection_where_nav_prop_all() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE NOT EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE ([c].[CustomerID] = [o].[CustomerID]) AND (([o].[CustomerID] <> 'ALFKI') OR [o].[CustomerID] IS NULL))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.GroupBy_on_nav_prop() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[City]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
ORDER BY [o#Customer].[City]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersJetTest.Include_query_opt_out() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_then_include_collection(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID], [c#Orders].[OrderID]",
|
|
//
|
|
@"SELECT [c#Orders#OrderDetails].[OrderID], [c#Orders#OrderDetails].[ProductID], [c#Orders#OrderDetails].[Discount], [c#Orders#OrderDetails].[Quantity], [c#Orders#OrderDetails].[UnitPrice]
|
|
FROM [Order Details] AS [c#Orders#OrderDetails]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c#Orders0].[OrderID], [t0].[CustomerID]
|
|
FROM [Orders] AS [c#Orders0]
|
|
INNER JOIN (
|
|
SELECT [c1].[CustomerID]
|
|
FROM [Customers] AS [c1]
|
|
) AS [t0] ON [c#Orders0].[CustomerID] = [t0].[CustomerID]
|
|
) AS [t1] ON [c#Orders#OrderDetails].[OrderID] = [t1].[OrderID]
|
|
ORDER BY [t1].[CustomerID], [t1].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Join_with_nav_projected_in_subquery_when_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [od0].[OrderID], [od0].[ProductID], [od0].[Discount], [od0].[Quantity], [od0].[UnitPrice], [od#Product0].[ProductID], [od#Product0].[Discontinued], [od#Product0].[ProductName], [od#Product0].[UnitPrice], [od#Product0].[UnitsInStock]
|
|
FROM [Order Details] AS [od0]
|
|
INNER JOIN [Products] AS [od#Product0] ON [od0].[ProductID] = [od#Product0].[ProductID]",
|
|
//
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate], [o#Customer0].[CustomerID], [o#Customer0].[Address], [o#Customer0].[City], [o#Customer0].[CompanyName], [o#Customer0].[ContactName], [o#Customer0].[ContactTitle], [o#Customer0].[Country], [o#Customer0].[Fax], [o#Customer0].[Phone], [o#Customer0].[PostalCode], [o#Customer0].[Region]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_then_include_collection(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID], [c#Orders].[OrderID]",
|
|
//
|
|
@"SELECT [c#Orders#OrderDetails].[OrderID], [c#Orders#OrderDetails].[ProductID], [c#Orders#OrderDetails].[Discount], [c#Orders#OrderDetails].[Quantity], [c#Orders#OrderDetails].[UnitPrice]
|
|
FROM [Order Details] AS [c#Orders#OrderDetails]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c#Orders0].[OrderID], [t0].[CustomerID]
|
|
FROM [Orders] AS [c#Orders0]
|
|
INNER JOIN (
|
|
SELECT [c1].[CustomerID]
|
|
FROM [Customers] AS [c1]
|
|
) AS [t0] ON [c#Orders0].[CustomerID] = [t0].[CustomerID]
|
|
) AS [t1] ON [c#Orders#OrderDetails].[OrderID] = [t1].[OrderID]
|
|
ORDER BY [t1].[CustomerID], [t1].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_static_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__StaticFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__StaticFieldValue_0",
|
|
//
|
|
@"@__StaticFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__StaticFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested_negated3() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE NOT EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A')) AND (([c].[City] <> 'London') OR [c].[City] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_subquery_involving_join_binds_to_correct_table() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] > 11000) AND [o].[OrderID] IN (
|
|
SELECT [od].[OrderID]
|
|
FROM [Order Details] AS [od]
|
|
INNER JOIN [Products] AS [od#Product] ON [od].[ProductID] = [od#Product].[ProductID]
|
|
WHERE [od#Product].[ProductName] = 'Chai'
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_take_no_order_by(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@__p_0='10'
|
|
|
|
SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Singleton_Navigation_With_Member_Access() :
|
|
AssertSql(
|
|
@"SELECT [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City] AS [B], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE ([o#Customer].[City] = 'Seattle') AND (([o#Customer].[Phone] <> '555 555 5555') OR [o#Customer].[Phone] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_filter_reordered(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_of_type_bird_first() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [b].[Species], [b].[CountryId], [b].[Discriminator], [b].[Name], [b].[EagleId], [b].[IsFlightless], [b].[Group], [b].[FoundOn]
|
|
FROM [Animal] AS [b]
|
|
WHERE [b].[Discriminator] IN ('Kiwi', 'Eagle') AND ([b].[CountryId] = 1)
|
|
ORDER BY [b].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_is_kiwi_in_projection() :
|
|
AssertSql(
|
|
@"SELECT IIf(
|
|
[a].[Discriminator] = 'Kiwi',
|
|
True,
|
|
False
|
|
)
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle') AND ([a].[CountryId] = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_of_type_bird_with_projection() :
|
|
AssertSql(
|
|
@"SELECT [b].[EagleId]
|
|
FROM [Animal] AS [b]
|
|
WHERE [b].[Discriminator] IN ('Kiwi', 'Eagle') AND ([b].[CountryId] = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_is_kiwi() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE ([a].[Discriminator] IN ('Kiwi', 'Eagle') AND ([a].[CountryId] = 1)) AND ([a].[Discriminator] = 'Kiwi')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_of_type_bird_predicate() :
|
|
AssertSql(
|
|
@"SELECT [b].[Species], [b].[CountryId], [b].[Discriminator], [b].[Name], [b].[EagleId], [b].[IsFlightless], [b].[Group], [b].[FoundOn]
|
|
FROM [Animal] AS [b]
|
|
WHERE ([b].[Discriminator] IN ('Kiwi', 'Eagle') AND ([b].[CountryId] = 1)) AND ([b].[CountryId] = 1)
|
|
ORDER BY [b].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersInheritanceJetTest.Can_use_of_type_animal() :
|
|
AssertSql(
|
|
@"SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
|
|
FROM [Animal] AS [a]
|
|
WHERE [a].[Discriminator] IN ('Kiwi', 'Eagle') AND ([a].[CountryId] = 1)
|
|
ORDER BY [a].[Species]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_select_many() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
, [Employees] AS [e]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_in_complex_predicate() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE (([p].[ProductID] > 100) AND ([p].[Discontinued] = True)) OR ([p].[Discontinued] = True)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Project_single_entity_value_subquery_works() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.LastOrDefault() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_take_max() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT MAX([t].[OrderID])
|
|
FROM (
|
|
SELECT TOP @__p_0 [o].[OrderID]
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_order_by_non_key(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[City], [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[City], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_list_inline() : line() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 6232
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_principal_already_tracked_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_principal_already_tracked_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_dependent_already_tracked(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_dependent_already_tracked(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Join_with_nav_in_predicate_in_subquery_when_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [od0].[OrderID], [od0].[ProductID], [od0].[Discount], [od0].[Quantity], [od0].[UnitPrice], [od#Product0].[ProductID], [od#Product0].[Discontinued], [od#Product0].[ProductName], [od#Product0].[UnitPrice], [od#Product0].[UnitsInStock]
|
|
FROM [Order Details] AS [od0]
|
|
INNER JOIN [Products] AS [od#Product0] ON [od0].[ProductID] = [od#Product0].[ProductID]",
|
|
//
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate], [o#Customer0].[CustomerID], [o#Customer0].[Address], [o#Customer0].[City], [o#Customer0].[CompanyName], [o#Customer0].[ContactName], [o#Customer0].[ContactTitle], [o#Customer0].[Country], [o#Customer0].[Fax], [o#Customer0].[Phone], [o#Customer0].[PostalCode], [o#Customer0].[Region]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_closure_constant() :
|
|
AssertSql(
|
|
@"@__predicate_0='True'
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE @__predicate_0 = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_customers_orders_with_subquery_anonymous_property_method_with_take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT [t].[OrderID], [t].[CustomerID], [t].[EmployeeID], [t].[OrderDate]
|
|
FROM (
|
|
SELECT TOP @__p_0 [o2].[OrderID], [o2].[CustomerID], [o2].[EmployeeID], [o2].[OrderDate]
|
|
FROM [Orders] AS [o2]
|
|
ORDER BY [o2].[OrderID]
|
|
) AS [t]",
|
|
//
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_simple() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Collection_select_nav_prop_first_or_default() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BERGS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BLAUS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BLONP' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BOLID' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]");
|
|
|
|
Output truncated.
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Collection_select_nav_prop_all_client() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BERGS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BLAUS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BLONP' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BOLID' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]");
|
|
|
|
Output truncated.
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation_Null_Deep() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
LEFT JOIN [Employees] AS [e#Manager] ON [e].[ReportsTo] = [e#Manager].[EmployeeID]
|
|
WHERE [e#Manager].[ReportsTo] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_conditional_order_by(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(
|
|
[c].[CustomerID] LIKE 'S' + '%' AND (LEFT([c].[CustomerID], LEN('S')) = 'S'),
|
|
1,
|
|
2
|
|
), [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID], IIf(
|
|
[c0].[CustomerID] LIKE 'S' + '%' AND (LEFT([c0].[CustomerID], LEN('S')) = 'S'),
|
|
1,
|
|
2
|
|
) AS [c]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[c], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_negated_twice() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_one_element_SingleOrDefault() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]",
|
|
//
|
|
@"@_outer_ReportsTo='2'
|
|
|
|
SELECT TOP 2 [e20].[EmployeeID]
|
|
FROM [Employees] AS [e20]
|
|
WHERE [e20].[EmployeeID] = @_outer_ReportsTo",
|
|
//
|
|
@"SELECT TOP 2 [e20].[EmployeeID]
|
|
FROM [Employees] AS [e20]
|
|
WHERE [e20].[EmployeeID] IS NULL",
|
|
//
|
|
@"@_outer_ReportsTo='2'
|
|
|
|
SELECT TOP 2 [e20].[EmployeeID]
|
|
FROM [Employees] AS [e20]
|
|
WHERE [e20].[EmployeeID] = @_outer_ReportsTo");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_math_round_int() :
|
|
AssertSql(
|
|
@"SELECT ROUND(CDbl(IIf(IsNull([o].[OrderID]),0,[o].[OrderID])), 0) AS [A]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderID] < 10250");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_count_using_DTO() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID] AS [Id], (
|
|
SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE [c].[CustomerID] = [o].[CustomerID]
|
|
) AS [Count]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_as_no_tracking2(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@__p_0='5'
|
|
|
|
SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_OrderBy_Count() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT COUNT(*)
|
|
FROM (
|
|
SELECT TOP @__p_0 [o].*
|
|
FROM [Orders] AS [o]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_EndsWith_Column() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (RIGHT([c].[ContactName], LEN([c].[ContactName])) = [c].[ContactName]) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Substring_with_client_eval() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[ContactName]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_with_skip(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='80'
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName], [c].[CustomerID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_with_skip(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='80'
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName], [c].[CustomerID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_additional_from_clause2(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT [t].[CustomerID], [t].[Address], [t].[City], [t].[CompanyName], [t].[ContactName], [t].[ContactTitle], [t].[Country], [t].[Fax], [t].[Phone], [t].[PostalCode], [t].[Region]
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t]
|
|
, [Customers] AS [c2]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Projection_null_coalesce_operator() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[CompanyName], IIf(IsNull([c].[Region]), 'ZZ', [c].[Region]) AS [Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_parameter() :
|
|
AssertSql(
|
|
@"@__prm_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE @__prm_0 = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Null_conditional_deep() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE CInt(IIf(IsNull(LEN([c].[CustomerID])),0,LEN([c].[CustomerID]))) = 5");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_not_in_optimization4() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE [c].[City] NOT IN ('London', 'Berlin', 'Seattle', 'Lisboa')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_concat_with_navigation1() :
|
|
AssertSql(
|
|
@"SELECT ([o].[CustomerID] + ' ') + [o#Customer].[City]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_member_distinct_where() :
|
|
AssertSql(
|
|
@"SELECT [t].[Property]
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] AS [Property]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[Property] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_multi_level_reference_and_collection_predicate(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE [o].[OrderID] = 10248
|
|
ORDER BY [o#Customer].[CustomerID]",
|
|
//
|
|
@"SELECT [o#Customer#Orders].[OrderID], [o#Customer#Orders].[CustomerID], [o#Customer#Orders].[EmployeeID], [o#Customer#Orders].[OrderDate]
|
|
FROM [Orders] AS [o#Customer#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [t].*
|
|
FROM (
|
|
SELECT TOP 1 [o#Customer0].[CustomerID]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]
|
|
WHERE [o0].[OrderID] = 10248
|
|
ORDER BY [o#Customer0].[CustomerID]
|
|
) AS [t]
|
|
) AS [t0] ON [o#Customer#Orders].[CustomerID] = [t0].[CustomerID]
|
|
ORDER BY [t0].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_multi_level_reference_and_collection_predicate(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
WHERE [o].[OrderID] = 10248
|
|
ORDER BY [o#Customer].[CustomerID]",
|
|
//
|
|
@"SELECT [o#Customer#Orders].[OrderID], [o#Customer#Orders].[CustomerID], [o#Customer#Orders].[EmployeeID], [o#Customer#Orders].[OrderDate]
|
|
FROM [Orders] AS [o#Customer#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [t].*
|
|
FROM (
|
|
SELECT TOP 1 [o#Customer0].[CustomerID]
|
|
FROM [Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID]
|
|
WHERE [o0].[OrderID] = 10248
|
|
ORDER BY [o#Customer0].[CustomerID]
|
|
) AS [t]
|
|
) AS [t0] ON [o#Customer#Orders].[CustomerID] = [t0].[CustomerID]
|
|
ORDER BY [t0].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Sum_on_float_column_in_subquery() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], (
|
|
SELECT CSng(IIf(IsNull(SUM([od].[Discount])),0,SUM([od].[Discount])))
|
|
FROM [Order Details] AS [od]
|
|
WHERE [o].[OrderID] = [od].[OrderID]
|
|
) AS [Sum]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderID] < 10300");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_orderBy_take_count() :
|
|
AssertSql(
|
|
@"@__p_0='7'
|
|
|
|
SELECT COUNT(*)
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[Country]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_multi_level3() :
|
|
AssertSql(
|
|
@"SELECT (
|
|
SELECT TOP 1 [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND ([c].[CustomerID] = [o].[CustomerID])
|
|
) AS [OrderDates]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_order_by_non_key_with_take(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactTitle], [c].[CustomerID]",
|
|
//
|
|
@"@__p_0='10'
|
|
|
|
SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [c0].[CustomerID], [c0].[ContactTitle]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[ContactTitle], [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[ContactTitle], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_order_by_non_key_with_take(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactTitle], [c].[CustomerID]",
|
|
//
|
|
@"@__p_0='10'
|
|
|
|
SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [c0].[CustomerID], [c0].[ContactTitle]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[ContactTitle], [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[ContactTitle], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_last(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CompanyName] DESC, [c].[CustomerID] DESC",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID], [c0].[CompanyName]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CompanyName] DESC, [c0].[CustomerID] DESC
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CompanyName] DESC, [t].[CustomerID] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_Where_Count() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_with_take(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[City] DESC, [c].[CustomerID]",
|
|
//
|
|
@"@__p_0='10'
|
|
|
|
SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[City] DESC, [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[City] DESC, [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_false() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_where_skip_take_projection(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='1'
|
|
@__p_1='2'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [od#Order].[CustomerID]
|
|
FROM [Order Details] AS [od]
|
|
INNER JOIN [Orders] AS [od#Order] ON [od].[OrderID] = [od#Order].[OrderID]
|
|
WHERE [od].[Quantity] = 10
|
|
ORDER BY [od].[OrderID], [od].[ProductID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_where_skip_take_projection(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='1'
|
|
@__p_1='2'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [od#Order].[CustomerID]
|
|
FROM [Order Details] AS [od]
|
|
INNER JOIN [Orders] AS [od#Order] ON [od].[OrderID] = [od#Order].[OrderID]
|
|
WHERE [od].[Quantity] = 10
|
|
ORDER BY [od].[OrderID], [od].[ProductID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_member_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] AS [Property]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[Property] LIKE 'A' + '%' AND (LEFT([t].[Property], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_additional_from_clause_with_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c1]
|
|
, [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM [Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c0].[CustomerID]
|
|
FROM [Customers] AS [c10]
|
|
, [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_using_int_overload_on_mismatched_types() :
|
|
AssertSql(
|
|
@"@__shortPrm_0='1'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[EmployeeID] = @__shortPrm_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_EndsWith_Identity() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (RIGHT([c].[ContactName], LEN([c].[ContactName])) = [c].[ContactName]) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_de_morgan_and_optimizated() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ([p].[Discontinued] = False) OR ([p].[ProductID] >= 20)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Local_array() :
|
|
AssertSql(
|
|
@"@__get_Item_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = @__get_Item_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_Customers_Orders_Skip_Take() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
@__p_1='5'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [c].[ContactName], [o].[OrderID]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_long_to_string() :
|
|
AssertSql(
|
|
@"SELECT Str([o].[OrderID]) AS [ShipName]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_no_arg() :
|
|
AssertSql(
|
|
@"SELECT AVG(CDbl(IIf(IsNull([o].[OrderID]),0,[o].[OrderID])))
|
|
FROM [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Distinct_Take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT TOP @__p_0 [t].[OrderID], [t].[CustomerID], [t].[EmployeeID], [t].[OrderDate]
|
|
FROM (
|
|
SELECT DISTINCT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
) AS [t]
|
|
ORDER BY [t].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_sql_injection() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ALFKI', 'ABC'')); GO; DROP TABLE Orders; GO; --', 'ALFKI', 'ABCDE')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested3() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A')) AND (([c].[City] <> 'London') OR [c].[City] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.SelectMany_projection1() :
|
|
AssertSql(
|
|
@"SELECT [e1].[City], [e2].[Country]
|
|
FROM [Employees] AS [e1]
|
|
, [Employees] AS [e2]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_EndsWith_MethodCall() :
|
|
AssertSql(
|
|
@"@__LocalMethod2_0='m' (Nullable = false) (Size = 1)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (RIGHT([c].[ContactName], LEN(@__LocalMethod2_0)) = @__LocalMethod2_0) OR (@__LocalMethod2_0 = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_0",
|
|
//
|
|
@"@__city_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_expression_invoke() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition2_FirstOrDefault() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]
|
|
WHERE [t].[FirstName] = (
|
|
SELECT TOP 1 [e0].[FirstName]
|
|
FROM [Employees] AS [e0]
|
|
ORDER BY [e0].[EmployeeID]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Anonymous_member_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[CustomerID] LIKE 'A' + '%' AND (LEFT([t].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_Customers_Orders_Projection_With_String_Concat_Skip_Take() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
@__p_1='5'
|
|
|
|
SELECT TOP @__p_1+@__p_0 ([c].[ContactName] + ' ') + [c].[ContactTitle] AS [Contact], [o].[OrderID]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_select_many_or3() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE [c].[City] IN ('London', 'Berlin', 'Seattle')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_compared_to_binary_expression() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = IIf(
|
|
[p].[ProductID] > 50,
|
|
True,
|
|
False
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Null_conditional_simple() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_comparison_to_nullable_bool() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE RIGHT([c].[CustomerID], LEN('KI')) = 'KI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bitwise_or_with_logical_or() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ((IIf(
|
|
[c].[CustomerID] = 'ALFKI',
|
|
True,
|
|
False
|
|
) BOR IIf(
|
|
[c].[CustomerID] = 'ANATR',
|
|
True,
|
|
False
|
|
)) = True) OR ([c].[CustomerID] = 'ANTON')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_subquery_and_local_array_closure() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Customers] AS [c1]
|
|
WHERE [c1].[City] IN ('London', 'Buenos Aires') AND ([c1].[CustomerID] = [c].[CustomerID]))",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Customers] AS [c1]
|
|
WHERE [c1].[City] IN ('London') AND ([c1].[CustomerID] = [c].[CustomerID]))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Lifting_when_subquery_nested_order_by_anonymous() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT [c1_Orders].[OrderID], [c1_Orders].[CustomerID], [c1_Orders].[EmployeeID], [c1_Orders].[OrderDate], [t0].[CustomerID]
|
|
FROM [Orders] AS [c1_Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [t].[CustomerID]
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t]
|
|
, [Customers] AS [c2]
|
|
) AS [t0] ON [c1_Orders].[CustomerID] = [t0].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Distinct_Take_Count() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT TOP @__p_0 [o].*
|
|
FROM [Orders] AS [o]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_many_cross_join_same_collection() :
|
|
AssertSql(
|
|
@"SELECT [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region]
|
|
FROM [Customers] AS [c]
|
|
, [Customers] AS [c0]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_arg() :
|
|
AssertSql(
|
|
@"SELECT AVG(CDbl(IIf(IsNull([o].[OrderID]),0,[o].[OrderID])))
|
|
FROM [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_bitwise_or_with_logical_or() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], IIf(
|
|
((IIf(
|
|
[c].[CustomerID] = 'ALFKI',
|
|
True,
|
|
False
|
|
) BOR IIf(
|
|
[c].[CustomerID] = 'ANATR',
|
|
True,
|
|
False
|
|
)) = True) OR ([c].[CustomerID] = 'ANTON'),
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_LastOrDefault() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Contains_Literal() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE Instr([c].[ContactName], 'M') > 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_on_mismatched_types_nullable_int_long() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True",
|
|
//
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_false() :
|
|
AssertSql(
|
|
@"@__flag_0='False'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ((@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)) OR ((@__flag_0 <> True) AND ([p].[UnitsInStock] < 20))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_division_on_decimal_no_significant_digits() :
|
|
AssertSql(
|
|
@"SELECT AVG(CCur(IIf(IsNull([od].[Quantity] / 2.0),0,[od].[Quantity] / 2.0)))
|
|
FROM [Order Details] AS [od]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_concat_string_int_comparison1() :
|
|
AssertSql(
|
|
@"@__i_0='10'
|
|
|
|
SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[CustomerID] + (@__i_0&"""")) = [c].[CompanyName]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Single_Predicate() :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_simple_parameterized() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_complex_predicate_or() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI', 'ALFKI', 'ABCDE')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_select_many_and() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE (([c].[City] = 'London') AND ([c].[Country] = 'UK')) AND (([e].[City] = 'London') AND ([e].[Country] = 'UK'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_with_multiple_conditions_still_uses_exists() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[City] = 'London') AND EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[EmployeeID] = 1) AND ([c].[CustomerID] = [o].[CustomerID]))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_on_float_column_in_subquery() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderID] < 10300",
|
|
//
|
|
@"@_outer_OrderID='10248'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10249'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10250'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10251'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10252'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10253'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10254'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10255'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]");
|
|
|
|
Output truncated.
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_other_to_string() :
|
|
AssertSql(
|
|
@"SELECT Str([o].[OrderDate]) AS [ShipName]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_on_float_column() :
|
|
AssertSql(
|
|
@"SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od].[Discount]),0,[od].[Discount])))),0,AVG(CSng(IIf(IsNull([od].[Discount]),0,[od].[Discount])))))
|
|
FROM [Order Details] AS [od]
|
|
WHERE [od].[ProductID] = 1");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_join_select() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_sin() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (SIN([od].[Discount]) > 0E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_concat_string_int_comparison2() :
|
|
AssertSql(
|
|
@"@__i_0='10'
|
|
|
|
SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE ((@__i_0&"""") + [c].[CustomerID]) = [c].[CompanyName]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_skip_take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
@__p_1='8'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactTitle], [c].[ContactName]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_concat_string_int_comparison3() :
|
|
AssertSql(
|
|
@"@__j_1='21'
|
|
@__i_0='10'
|
|
|
|
SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE ((((@__i_0 + 20&"""") + [c].[CustomerID]) + (@__j_1&"""")) + (42&"""")) = [c].[CompanyName]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_in_optimization_multiple() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE ([c].[City] IN ('London', 'Berlin') OR ([c].[CustomerID] = 'ALFKI')) OR ([c].[CustomerID] = 'ABCDE')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_simple_subquery() :
|
|
AssertSql(
|
|
@"@__p_0='4'
|
|
|
|
SELECT [t].[OrderID], [t].[CustomerID], [t].[EmployeeID], [t].[OrderDate]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]
|
|
) AS [t] ON [c].[CustomerID] = [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_multi_level6() :
|
|
AssertSql(
|
|
@"SELECT (
|
|
SELECT TOP 1 (
|
|
SELECT TOP 1 [od].[ProductID]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] <> CInt(IIf(IsNull(LEN([c].[CustomerID])),0,LEN([c].[CustomerID])))) AND ([o].[OrderID] = [od].[OrderID])
|
|
)
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND ([c].[CustomerID] = [o].[CustomerID])
|
|
) AS [Order]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_negated_boolean_expression_compared_to_another_negated_boolean_expression() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE IIf(
|
|
[p].[ProductID] > 50,
|
|
True,
|
|
False
|
|
) = IIf(
|
|
[p].[ProductID] > 20,
|
|
True,
|
|
False
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_StartsWith_Identity() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[ContactName] LIKE [c].[ContactName] + '%' AND (LEFT([c].[ContactName], LEN([c].[ContactName])) = [c].[ContactName])) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OfType_Select() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [o#Customer].[City]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
ORDER BY [o].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_complex_distinct_where() :
|
|
AssertSql(
|
|
@"SELECT [t].[Property]
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] + [c].[City] AS [Property]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[Property] = 'ALFKIBerlin'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_select_many_or_with_parameter() :
|
|
AssertSql(
|
|
@"@__lisboa_1='Lisboa' (Nullable = false) (Size = 6)
|
|
@__london_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE [c].[City] IN (@__london_0, 'Berlin', 'Seattle', @__lisboa_1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_is_not_null() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]",
|
|
//
|
|
@"@_outer_ReportsTo='2'
|
|
|
|
SELECT TOP 2 [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = @_outer_ReportsTo",
|
|
//
|
|
@"SELECT TOP 2 [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] IS NULL",
|
|
//
|
|
@"@_outer_ReportsTo='2'
|
|
|
|
SELECT TOP 2 [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = @_outer_ReportsTo");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.SelectMany_entity_deep() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title], [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title], [e3].[EmployeeID], [e3].[City], [e3].[Country], [e3].[FirstName], [e3].[ReportsTo], [e3].[Title], [e4].[EmployeeID], [e4].[City], [e4].[Country], [e4].[FirstName], [e4].[ReportsTo], [e4].[Title]
|
|
FROM [Employees] AS [e1]
|
|
, [Employees] AS [e2]
|
|
, [Employees] AS [e3]
|
|
, [Employees] AS [e4]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_customers_orders_with_subquery_with_take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT [c].[ContactName], [t].[OrderID]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [o2].*
|
|
FROM [Orders] AS [o2]
|
|
ORDER BY [o2].[OrderID]
|
|
) AS [t] ON [c].[CustomerID] = [t].[CustomerID]
|
|
WHERE [t].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_true() :
|
|
AssertSql(
|
|
@"@__flag_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ((@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)) OR ((@__flag_0 <> True) AND ([p].[UnitsInStock] < 20))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_complex_predicate_not_matching_ins1() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ALFKI', 'ABCDE') OR [c].[CustomerID] NOT IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_client_side_negated() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_Where_Distinct_Count() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [t].*
|
|
FROM (
|
|
SELECT TOP @__p_0 [o].*
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'FRANK'
|
|
) AS [t]
|
|
) AS [t0]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_multi_level() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 3 [o].[OrderDate] AS [Date]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND (@_outer_CustomerID = [o].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 3 [o].[OrderDate] AS [Date]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND (@_outer_CustomerID = [o].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 3 [o].[OrderDate] AS [Date]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND (@_outer_CustomerID = [o].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 3 [o].[OrderDate] AS [Date]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND (@_outer_CustomerID = [o].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_correlated_subquery_projection() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[CustomerID]
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
ORDER BY [t].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = @_outer_CustomerID",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = @_outer_CustomerID",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = @_outer_CustomerID");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_coalesce_take_distinct() :
|
|
AssertSql(
|
|
@"@__p_0='15'
|
|
|
|
SELECT DISTINCT [t].*
|
|
FROM (
|
|
SELECT TOP @__p_0 [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
ORDER BY IIf(IsNull([p].[UnitPrice]), 0.0, [p].[UnitPrice])
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_SelectMany() :
|
|
AssertSql(
|
|
@"SELECT [c].[ContactName], [t].[OrderID]
|
|
FROM [Customers] AS [c]
|
|
, (
|
|
SELECT TOP 3 [o].*
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]
|
|
) AS [t]
|
|
WHERE [c].[CustomerID] = [t].[CustomerID]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.IsNullOrEmpty_in_projection() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID] AS [Id], IIf(
|
|
[c].[Region] IS NULL OR ([c].[Region] = ''),
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_shadow_projection() :
|
|
AssertSql(
|
|
@"SELECT [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[Title] = 'Sales Representative'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_closure_via_query_cache_nullable_type() :
|
|
AssertSql(
|
|
@"@__reportsTo_0='2'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__reportsTo_0",
|
|
//
|
|
@"@__reportsTo_0='5'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__reportsTo_0",
|
|
//
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_nested_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_Nested_InstanceFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstanceFieldValue_0",
|
|
//
|
|
@"@__city_Nested_InstanceFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstanceFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_DefaultIfEmpty_Where() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Customers] AS [c]
|
|
LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [o].[OrderID] IS NOT NULL AND ([o].[CustomerID] = 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_constant_is_null() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested_negated() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE NOT EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Last() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_method_call_nullable_type_reverse_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_NullableInt_0='1'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[EmployeeID] > @__city_NullableInt_0",
|
|
//
|
|
@"@__city_NullableInt_0='5'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[EmployeeID] > @__city_NullableInt_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_take_average() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT AVG(CDbl(IIf(IsNull([t].[OrderID]),0,[t].[OrderID])))
|
|
FROM (
|
|
SELECT TOP @__p_0 [o].[OrderID]
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_subquery_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__customerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[CustomerID] = @__customerID_0) AND ([o].[CustomerID] = [c].[CustomerID]))",
|
|
//
|
|
@"@__customerID_0='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[CustomerID] = @__customerID_0) AND ([o].[CustomerID] = [c].[CustomerID]))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_exp() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (EXP([od].[Discount]) > 1E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Skip_Take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
@__p_1='10'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_de_morgan_or_optimizated() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ([p].[Discontinued] = False) AND ([p].[ProductID] >= 20)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_bitwise_and() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], IIf(
|
|
[c].[CustomerID] = 'ALFKI',
|
|
True,
|
|
False
|
|
) BAND IIf(
|
|
[c].[CustomerID] = 'ANATR',
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title]
|
|
FROM [Employees] AS [e1]
|
|
WHERE [e1].[FirstName] = (
|
|
SELECT TOP 1 [e].[FirstName]
|
|
FROM [Employees] AS [e]
|
|
ORDER BY [e].[EmployeeID]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_scalar_primitive_after_take() :
|
|
AssertSql(
|
|
@"@__p_0='9'
|
|
|
|
SELECT TOP @__p_0 [e].[EmployeeID]
|
|
FROM [Employees] AS [e]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.FirstOrDefault_inside_subquery_gets_server_evaluated() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[CustomerID] = 'ALFKI') AND ((
|
|
SELECT TOP 1 [o].[CustomerID]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[CustomerID] = 'ALFKI') AND ([c].[CustomerID] = [o].[CustomerID])
|
|
) = 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_orderby_select_many() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
, [Orders] AS [o]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_coalesce() :
|
|
AssertSql(
|
|
@"SELECT AVG(CCur(IIf(IsNull(IIf(IsNull([p].[UnitPrice]), 0.0, [p].[UnitPrice])),0,IIf(IsNull([p].[UnitPrice]), 0.0, [p].[UnitPrice]))))
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[ProductID] < 40");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bitwise_and_with_logical_or() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ((IIf(
|
|
[c].[CustomerID] = 'ALFKI',
|
|
True,
|
|
False
|
|
) BAND IIf(
|
|
[c].[CustomerID] = 'ANATR',
|
|
True,
|
|
False
|
|
)) = True) OR ([c].[CustomerID] = 'ANTON')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.IsNullOrWhiteSpace_in_predicate() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[Region] IS NULL OR (LTRIM(RTRIM([c].[Region])) = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_array_closure() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI')",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Subquery_is_null_translated_correctly() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (
|
|
SELECT TOP 1 [o].[CustomerID]
|
|
FROM [Orders] AS [o]
|
|
WHERE [c].[CustomerID] = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID] DESC
|
|
) IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_division_on_decimal() :
|
|
AssertSql(
|
|
@"SELECT AVG(CCur(IIf(IsNull([od].[Quantity] / 2.09),0,[od].[Quantity] / 2.09)))
|
|
FROM [Order Details] AS [od]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_multi_level4() :
|
|
AssertSql(
|
|
@"SELECT (
|
|
SELECT TOP 1 (
|
|
SELECT COUNT(*)
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] > 10) AND ([o].[OrderID] = [od].[OrderID])
|
|
)
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND ([c].[CustomerID] = [o].[CustomerID])
|
|
) AS [Order]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Handle_materialization_properly_when_more_than_two_query_sources_are_involved() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
, [Orders] AS [o]
|
|
, [Employees] AS [e]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Query_expression_with_to_string_and_contains() :
|
|
AssertSql(
|
|
@"SELECT [o].[CustomerID]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL AND (Instr(Str([o].[EmployeeID]), '10') > 0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_bitwise_or() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], IIf(
|
|
[c].[CustomerID] = 'ALFKI',
|
|
True,
|
|
False
|
|
) BOR IIf(
|
|
[c].[CustomerID] = 'ANATR',
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_simple_projection() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[City]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_static_property_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__StaticPropertyValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__StaticPropertyValue_0",
|
|
//
|
|
@"@__StaticPropertyValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__StaticPropertyValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_subquery_on_bool() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE 'Chai' IN (
|
|
SELECT [p2].[ProductName]
|
|
FROM [Products] AS [p2]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_Where_Subquery_Deep_First() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT TOP @__p_0 [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE (
|
|
SELECT TOP 1 (
|
|
SELECT TOP 1 [c].[City]
|
|
FROM [Customers] AS [c]
|
|
WHERE [o].[CustomerID] = [c].[CustomerID]
|
|
)
|
|
FROM [Orders] AS [o]
|
|
WHERE [od].[OrderID] = [o].[OrderID]
|
|
) = 'Seattle'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_DefaultIfEmpty3() :
|
|
AssertSql(
|
|
@"@__p_0='1'
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t]
|
|
LEFT JOIN [Orders] AS [o] ON [t].[CustomerID] = [o].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_client_deep_inside_predicate_and_server_top_level() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <> 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Subquery_is_not_null_translated_correctly() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (
|
|
SELECT TOP 1 [o].[CustomerID]
|
|
FROM [Orders] AS [o]
|
|
WHERE [c].[CustomerID] = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID] DESC
|
|
) IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_customers_orders_with_subquery_predicate_with_take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT [c].[ContactName], [t].[OrderID]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [o2].*
|
|
FROM [Orders] AS [o2]
|
|
WHERE [o2].[OrderID] > 0
|
|
ORDER BY [o2].[OrderID]
|
|
) AS [t] ON [c].[CustomerID] = [t].[CustomerID]
|
|
WHERE [t].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_false() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] NOT IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_parameter_compared_to_binary_expression() :
|
|
AssertSql(
|
|
@"@__prm_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE IIf(
|
|
[p].[ProductID] > 50,
|
|
True,
|
|
False
|
|
) <> @__prm_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Last_when_no_order_by() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_subquery_anon_nested() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title], [t0].[OrderID], [t0].[CustomerID], [t0].[EmployeeID], [t0].[OrderDate], [t1].[CustomerID], [t1].[Address], [t1].[City], [t1].[CompanyName], [t1].[ContactName], [t1].[ContactTitle], [t1].[Country], [t1].[Fax], [t1].[Phone], [t1].[PostalCode], [t1].[Region]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]
|
|
, (
|
|
SELECT TOP 5 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
) AS [t0]
|
|
, (
|
|
SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
) AS [t1]
|
|
WHERE [t].[City] = 'London'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_distinct_average() :
|
|
AssertSql(
|
|
@"SELECT AVG(CDbl(IIf(IsNull([t].[OrderID]),0,[t].[OrderID])))
|
|
FROM (
|
|
SELECT DISTINCT [o].[OrderID]
|
|
FROM [Orders] AS [o]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_anonymous_conditional_expression() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], IIf(
|
|
[p].[UnitsInStock] > 0,
|
|
True,
|
|
False
|
|
) AS [IsAvailable]
|
|
FROM [Products] AS [p]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_not_bool_member_compared_to_binary_expression() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] <> IIf(
|
|
[p].[ProductID] > 50,
|
|
True,
|
|
False
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_anonymous_constant_in_expression() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], CInt(IIf(IsNull(LEN([c].[CustomerID])),0,LEN([c].[CustomerID]))) + 5 AS [Expression]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_orderby_join_select() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] <> 'ALFKI'
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_DTO_with_member_init_distinct_in_subquery_translated_to_server() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[Count], [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM (
|
|
SELECT DISTINCT [o].[CustomerID] AS [Id], [o].[OrderID] AS [Count]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderID] < 10300
|
|
) AS [t]
|
|
, [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = [t].[Id]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Selected_column_can_coalesce() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(IsNull([c].[Region]), 'ZZ', [c].[Region])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_no_elements_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title]
|
|
FROM [Employees] AS [e1]
|
|
WHERE (
|
|
SELECT TOP 1 [e2].[EmployeeID]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = 42
|
|
) = 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_string_length() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE CInt(IIf(IsNull(LEN([c].[City])),0,LEN([c].[City]))) = 6");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_not_in_optimization1() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE (([c].[City] <> 'London') OR [c].[City] IS NULL) AND (([e].[City] <> 'London') OR [e].[City] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_cos() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (COS([od].[Discount]) > 0E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_not_in_optimization3() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE [c].[City] NOT IN ('London', 'Berlin', 'Seattle')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.SelectMany_simple2() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title], [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e2].[FirstName] AS [FirstName0]
|
|
FROM [Employees] AS [e1]
|
|
, [Customers] AS [c]
|
|
, [Employees] AS [e2]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested2() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (([c].[City] <> 'London') OR [c].[City] IS NULL) AND EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Count_with_predicate() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupBy_anonymous_with_where() :
|
|
AssertSql(
|
|
@"SELECT [c].[City], [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[Country] IN ('Argentina', 'Austria', 'Brazil', 'France', 'Germany', 'USA')
|
|
ORDER BY [c].[City]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_list_inline_closure_mix() : line_closure_mix() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 6242
|
|
AssertSql(
|
|
@"@__id_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', @__id_0)",
|
|
//
|
|
@"@__id_0='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', @__id_0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_closure_via_query_cache_nullable_type_reverse() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] IS NULL",
|
|
//
|
|
@"@__reportsTo_0='5'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__reportsTo_0",
|
|
//
|
|
@"@__reportsTo_0='2'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__reportsTo_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_property_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_InstancePropertyValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstancePropertyValue_0",
|
|
//
|
|
@"@__city_InstancePropertyValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstancePropertyValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_select_many_or2() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE [c].[City] IN ('London', 'Berlin')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_null_is_not_null() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_Where_Count_with_predicate() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] > 10) AND (([o].[CustomerID] <> 'ALFKI') OR [o].[CustomerID] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.IsNullOrEmpty_negated_in_projection() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID] AS [Id], IIf(
|
|
[c].[Region] IS NOT NULL AND ([c].[Region] <> ''),
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OfType_Select_OfType_Select() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [o#Customer].[City]
|
|
FROM [Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]
|
|
ORDER BY [o].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_Where_Subquery_Equality() :
|
|
AssertSql(
|
|
@"@__p_0='1'
|
|
|
|
SELECT [t].[OrderID], [t].[CustomerID], [t].[EmployeeID], [t].[OrderDate]
|
|
FROM (
|
|
SELECT TOP @__p_0 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
) AS [t]
|
|
ORDER BY [t].[OrderID]",
|
|
//
|
|
@"SELECT [t1].[OrderID]
|
|
FROM (
|
|
SELECT TOP 2 [od0].*
|
|
FROM [Order Details] AS [od0]
|
|
ORDER BY [od0].[OrderID]
|
|
) AS [t1]",
|
|
//
|
|
@"@_outer_CustomerID2='VINET' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [c3].[Country]
|
|
FROM [Customers] AS [c3]
|
|
WHERE [c3].[CustomerID] = @_outer_CustomerID2
|
|
ORDER BY [c3].[CustomerID]",
|
|
//
|
|
@"@_outer_OrderID1='10248'
|
|
|
|
SELECT TOP 1 [c4].[Country]
|
|
FROM [Orders] AS [o20]
|
|
INNER JOIN [Customers] AS [c4] ON [o20].[CustomerID] = [c4].[CustomerID]
|
|
WHERE [o20].[OrderID] = @_outer_OrderID1
|
|
ORDER BY [o20].[OrderID], [c4].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID2='VINET' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [c3].[Country]
|
|
FROM [Customers] AS [c3]
|
|
WHERE [c3].[CustomerID] = @_outer_CustomerID2
|
|
ORDER BY [c3].[CustomerID]",
|
|
//
|
|
@"@_outer_OrderID1='10248'
|
|
|
|
SELECT TOP 1 [c4].[Country]
|
|
FROM [Orders] AS [o20]
|
|
INNER JOIN [Customers] AS [c4] ON [o20].[CustomerID] = [c4].[CustomerID]
|
|
WHERE [o20].[OrderID] = @_outer_OrderID1
|
|
ORDER BY [o20].[OrderID], [c4].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID2='VINET' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [c3].[Country]
|
|
FROM [Customers] AS [c3]
|
|
WHERE [c3].[CustomerID] = @_outer_CustomerID2
|
|
ORDER BY [c3].[CustomerID]",
|
|
//
|
|
@"@_outer_OrderID1='10248'
|
|
|
|
SELECT TOP 1 [c4].[Country]
|
|
FROM [Orders] AS [o20]
|
|
INNER JOIN [Customers] AS [c4] ON [o20].[CustomerID] = [c4].[CustomerID]
|
|
WHERE [o20].[OrderID] = @_outer_OrderID1
|
|
ORDER BY [o20].[OrderID], [c4].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition2_FirstOrDefault_with_anonymous() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]",
|
|
//
|
|
@"SELECT TOP 1 [e0].[EmployeeID], [e0].[City], [e0].[Country], [e0].[FirstName], [e0].[ReportsTo], [e0].[Title]
|
|
FROM [Employees] AS [e0]
|
|
ORDER BY [e0].[EmployeeID]",
|
|
//
|
|
@"SELECT TOP 1 [e0].[EmployeeID], [e0].[City], [e0].[Country], [e0].[FirstName], [e0].[ReportsTo], [e0].[Title]
|
|
FROM [Employees] AS [e0]
|
|
ORDER BY [e0].[EmployeeID]",
|
|
//
|
|
@"SELECT TOP 1 [e0].[EmployeeID], [e0].[City], [e0].[Country], [e0].[FirstName], [e0].[ReportsTo], [e0].[Title]
|
|
FROM [Employees] AS [e0]
|
|
ORDER BY [e0].[EmployeeID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_Where_Subquery_Deep_Single() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE [od].[OrderID] = 10344",
|
|
//
|
|
@"@_outer_OrderID='10344'
|
|
|
|
SELECT TOP 2 [o0].[CustomerID]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_OrderID = [o0].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID1='WHITC' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 2 [c2].[City]
|
|
FROM [Customers] AS [c2]
|
|
WHERE @_outer_CustomerID1 = [c2].[CustomerID]",
|
|
//
|
|
@"@_outer_OrderID='10344'
|
|
|
|
SELECT TOP 2 [o0].[CustomerID]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_OrderID = [o0].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID1='WHITC' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 2 [c2].[City]
|
|
FROM [Customers] AS [c2]
|
|
WHERE @_outer_CustomerID1 = [c2].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_nested_property_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_Nested_InstancePropertyValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstancePropertyValue_0",
|
|
//
|
|
@"@__city_Nested_InstancePropertyValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstancePropertyValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_and_parameter_compared_to_binary_expression_nested() :
|
|
AssertSql(
|
|
@"@__prm_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = IIf(
|
|
IIf(
|
|
[p].[ProductID] > 50,
|
|
True,
|
|
False
|
|
) <> @__prm_0,
|
|
True,
|
|
False
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_Last() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Contains_MethodCall() :
|
|
AssertSql(
|
|
@"@__LocalMethod1_0='M' (Nullable = false) (Size = 1)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (Instr([c].[ContactName], @__LocalMethod1_0) > 0) OR (@__LocalMethod1_0 = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_compare_with_parameter() :
|
|
AssertSql(
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] > @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] < @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] >= @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] >= @__customer_CustomerID_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_bitwise_and_with_logical_and() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], IIf(
|
|
((IIf(
|
|
[c].[CustomerID] = 'ALFKI',
|
|
True,
|
|
False
|
|
) BAND IIf(
|
|
[c].[CustomerID] = 'ANATR',
|
|
True,
|
|
False
|
|
)) = True) AND ([c].[CustomerID] = 'ANTON'),
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Anonymous_complex_distinct_where() :
|
|
AssertSql(
|
|
@"SELECT [t].[A]
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] + [c].[City] AS [A]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[A] = 'ALFKIBerlin'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_equals_constant() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_InstanceFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstanceFieldValue_0",
|
|
//
|
|
@"@__city_InstanceFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstanceFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_binary_expression() :
|
|
AssertSql(
|
|
@"SELECT AVG(CDbl(IIf(IsNull([o].[OrderID] * 2),0,[o].[OrderID] * 2)))
|
|
FROM [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_on_matched_nullable_int_types() :
|
|
AssertSql(
|
|
@"@__nullableIntPrm_0='2'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE @__nullableIntPrm_0 = [e].[ReportsTo]",
|
|
//
|
|
@"@__nullableIntPrm_0='2'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__nullableIntPrm_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_Distinct() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT DISTINCT [t].*
|
|
FROM (
|
|
SELECT TOP @__p_0 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_OrderBy_Count() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_with_false_as_result_false() :
|
|
AssertSql(
|
|
@"@__flag_0='False'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE (@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Compare_multi_predicate() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] >= 'ALFKI' AND [c].[CustomerID] < 'CACTU'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[ContactTitle] = 'Owner' AND [c].[Country] <> 'USA'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_complex_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] + [c].[City] AS [Property]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[Property] LIKE 'A' + '%' AND (LEFT([t].[Property], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_with_false_as_result_true() :
|
|
AssertSql(
|
|
@"@__flag_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE (@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_new_instance_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__InstanceFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__InstanceFieldValue_0",
|
|
//
|
|
@"@__InstanceFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__InstanceFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_compare_null() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] IS NULL AND ([c].[Country] = 'UK')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_Take_Count() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT COUNT(*)
|
|
FROM (
|
|
SELECT TOP @__p_0 [o].*
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bitwise_and() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (IIf(
|
|
[c].[CustomerID] = 'ALFKI',
|
|
True,
|
|
False
|
|
) BAND IIf(
|
|
[c].[CustomerID] = 'ANATR',
|
|
True,
|
|
False
|
|
)) = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_take_count() :
|
|
AssertSql(
|
|
@"@__p_0='7'
|
|
|
|
SELECT COUNT(*)
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM [Customers] AS [c]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_subquery_correlated_client_eval() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT [t].[CustomerID], [t].[Address], [t].[City], [t].[CompanyName], [t].[ContactName], [t].[ContactTitle], [t].[Country], [t].[Fax], [t].[Phone], [t].[PostalCode], [t].[Region]
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
ORDER BY [t].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region]
|
|
FROM [Customers] AS [c2]
|
|
WHERE @_outer_CustomerID = [c2].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region]
|
|
FROM [Customers] AS [c2]
|
|
WHERE @_outer_CustomerID = [c2].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region]
|
|
FROM [Customers] AS [c2]
|
|
WHERE @_outer_CustomerID = [c2].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region]
|
|
FROM [Customers] AS [c2]
|
|
WHERE @_outer_CustomerID = [c2].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BERGS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region]
|
|
FROM [Customers] AS [c2]
|
|
WHERE @_outer_CustomerID = [c2].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Entity_equality_local() :
|
|
AssertSql(
|
|
@"@__local_0_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = @__local_0_CustomerID");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Queryable_simple_anonymous_projection_subquery() :
|
|
AssertSql(
|
|
@"@__p_0='91'
|
|
|
|
SELECT TOP @__p_0 [c].[City]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_primitive() :
|
|
AssertSql(
|
|
@"@__p_0='9'
|
|
|
|
SELECT [t].[EmployeeID]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]
|
|
WHERE [t].[EmployeeID] = 5");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_false() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = False");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_comparison_operator() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(
|
|
[c].[Region] = 'ASK',
|
|
True,
|
|
False
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_multiple_elements_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title]
|
|
FROM [Employees] AS [e1]
|
|
WHERE (
|
|
SELECT TOP 1 [e2].[EmployeeID]
|
|
FROM [Employees] AS [e2]
|
|
WHERE ([e2].[EmployeeID] <> [e1].[ReportsTo]) OR [e1].[ReportsTo] IS NULL
|
|
) = 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_using_object_overload_on_mismatched_types() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.SelectMany_simple1() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title], [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Employees] AS [e]
|
|
, [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_complex_predicate_and() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ALFKI', 'ABCDE') AND [c].[CustomerID] IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Sum_on_float_column() :
|
|
AssertSql(
|
|
@"SELECT CSng(IIf(IsNull(SUM([od].[Discount])),0,SUM([od].[Discount])))
|
|
FROM [Order Details] AS [od]
|
|
WHERE [od].[ProductID] = 1");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_shadow() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_on_mismatched_types_nullable_long_nullable_int() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True",
|
|
//
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.SelectMany_mixed() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
ORDER BY [e].[EmployeeID]
|
|
) AS [t]",
|
|
//
|
|
@"SELECT [t0].[CustomerID], [t0].[Address], [t0].[City], [t0].[CompanyName], [t0].[ContactName], [t0].[ContactTitle], [t0].[Country], [t0].[Fax], [t0].[Phone], [t0].[PostalCode], [t0].[Region]
|
|
FROM (
|
|
SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t0]",
|
|
//
|
|
@"SELECT [t0].[CustomerID], [t0].[Address], [t0].[City], [t0].[CompanyName], [t0].[ContactName], [t0].[ContactTitle], [t0].[Country], [t0].[Fax], [t0].[Phone], [t0].[PostalCode], [t0].[Region]
|
|
FROM (
|
|
SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t0]",
|
|
//
|
|
@"SELECT [t0].[CustomerID], [t0].[Address], [t0].[City], [t0].[CompanyName], [t0].[ContactName], [t0].[ContactTitle], [t0].[Country], [t0].[Fax], [t0].[Phone], [t0].[PostalCode], [t0].[Region]
|
|
FROM (
|
|
SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t0]",
|
|
//
|
|
@"SELECT [t0].[CustomerID], [t0].[Address], [t0].[City], [t0].[CompanyName], [t0].[ContactName], [t0].[ContactTitle], [t0].[Country], [t0].[Fax], [t0].[Phone], [t0].[PostalCode], [t0].[Region]
|
|
FROM (
|
|
SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t0]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_StartsWith_Literal() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[ContactName] LIKE 'M' + '%' AND (LEFT([c].[ContactName], LEN('M')) = 'M')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_one_element_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title]
|
|
FROM [Employees] AS [e1]
|
|
WHERE (
|
|
SELECT TOP 1 [e2].[EmployeeID]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = [e1].[ReportsTo]
|
|
) = 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_bitwise_and_or() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], (IIf(
|
|
[c].[CustomerID] = 'ALFKI',
|
|
True,
|
|
False
|
|
) BAND IIf(
|
|
[c].[CustomerID] = 'ANATR',
|
|
True,
|
|
False
|
|
)) BOR IIf(
|
|
[c].[CustomerID] = 'ANTON',
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_false_shadow() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = False");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_tan() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (TAN([od].[Discount]) > 0E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_array_inline() : line() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 6212
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_conditional_operator_where_condition_null() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(
|
|
False = True,
|
|
'ZZ',
|
|
[c].[City]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Last_Predicate() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Entity_equality_local_inline() : line() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 173
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ANATR'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_multi_level2() :
|
|
AssertSql(
|
|
@"SELECT (
|
|
SELECT TOP 1 [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND ([c].[CustomerID] = [o].[CustomerID])
|
|
) AS [OrderDates]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_Where() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Environment_newline_is_funcletized() : line_is_funcletized() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 6638
|
|
AssertSql(
|
|
@"@__NewLine_0='
|
|
' (Nullable = false) (Size = 2)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (Instr([c].[CustomerID], @__NewLine_0) > 0) OR (@__NewLine_0 = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Compare_simple_one() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] > 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] < 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] >= 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] >= 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_no_elements_SingleOrDefault() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]",
|
|
//
|
|
@"SELECT TOP 2 [e20].[EmployeeID]
|
|
FROM [Employees] AS [e20]
|
|
WHERE [e20].[EmployeeID] = 42",
|
|
//
|
|
@"SELECT TOP 2 [e20].[EmployeeID]
|
|
FROM [Employees] AS [e20]
|
|
WHERE [e20].[EmployeeID] = 42",
|
|
//
|
|
@"SELECT TOP 2 [e20].[EmployeeID]
|
|
FROM [Employees] AS [e20]
|
|
WHERE [e20].[EmployeeID] = 42");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.LastOrDefault_Predicate() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_complex_negated_expression_optimized() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE (([p].[Discontinued] = False) AND ([p].[ProductID] < 60)) AND ([p].[ProductID] > 30)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_list_closure() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Subquery_member_pushdown_does_not_change_original_subquery_model() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[CustomerID], [t].[OrderID]
|
|
FROM (
|
|
SELECT TOP @__p_0 [o].*
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]
|
|
) AS [t]",
|
|
//
|
|
@"@_outer_CustomerID='VINET' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 2 [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = @_outer_CustomerID",
|
|
//
|
|
@"@_outer_CustomerID='TOMSP' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 2 [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = @_outer_CustomerID",
|
|
//
|
|
@"@_outer_CustomerID='HANAR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 2 [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = @_outer_CustomerID",
|
|
//
|
|
@"@_outer_CustomerID1='TOMSP' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 2 [c2].[City]
|
|
FROM [Customers] AS [c2]
|
|
WHERE [c2].[CustomerID] = @_outer_CustomerID1",
|
|
//
|
|
@"@_outer_CustomerID1='VINET' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 2 [c2].[City]
|
|
FROM [Customers] AS [c2]
|
|
WHERE [c2].[CustomerID] = @_outer_CustomerID1",
|
|
//
|
|
@"@_outer_CustomerID1='HANAR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 2 [c2].[City]
|
|
FROM [Customers] AS [c2]
|
|
WHERE [c2].[CustomerID] = @_outer_CustomerID1");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Compare_simple_zero() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <> 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] > 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] > 'ALFKI'",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_select_many_or4() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM ([Customers] AS [c])
|
|
, [Employees] AS [e]
|
|
WHERE [c].[City] IN ('London', 'Berlin', 'Seattle', 'Lisboa')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_Where_Count_with_predicate_client_eval_mixed() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[CustomerID] <> 'ALFKI') OR [o].[CustomerID] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_method_call_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__GetCity_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__GetCity_0",
|
|
//
|
|
@"@__GetCity_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__GetCity_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_count_using_anonymous_type() :
|
|
AssertSql(
|
|
@"SELECT (
|
|
SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE [c].[CustomerID] = [o].[CustomerID]
|
|
) AS [Count]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_bitwise_or_multiple() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], (IIf(
|
|
[c].[CustomerID] = 'ALFKI',
|
|
True,
|
|
False
|
|
) BOR IIf(
|
|
[c].[CustomerID] = 'ANATR',
|
|
True,
|
|
False
|
|
)) BOR IIf(
|
|
[c].[CustomerID] = 'ANTON',
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Let_any_subquery_anonymous() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT IIf(
|
|
EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o0]
|
|
WHERE [o0].[CustomerID] = @_outer_CustomerID),
|
|
True,
|
|
False
|
|
)
|
|
FROM (SELECT COUNT(*) FROM MSysAccessStorage)",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT IIf(
|
|
EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o0]
|
|
WHERE [o0].[CustomerID] = @_outer_CustomerID),
|
|
True,
|
|
False
|
|
)
|
|
FROM (SELECT COUNT(*) FROM MSysAccessStorage)",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT IIf(
|
|
EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o0]
|
|
WHERE [o0].[CustomerID] = @_outer_CustomerID),
|
|
True,
|
|
False
|
|
)
|
|
FROM (SELECT COUNT(*) FROM MSysAccessStorage)",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT IIf(
|
|
EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o0]
|
|
WHERE [o0].[CustomerID] = @_outer_CustomerID),
|
|
True,
|
|
False
|
|
)
|
|
FROM (SELECT COUNT(*) FROM MSysAccessStorage)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_StartsWith_Column() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[ContactName] LIKE [c].[ContactName] + '%' AND (LEFT([c].[ContactName], LEN([c].[ContactName])) = [c].[ContactName])) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_take_long_count() :
|
|
AssertSql(
|
|
@"@__p_0='7'
|
|
|
|
SELECT COUNT(*)
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM [Customers] AS [c]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_Customers_Orders_Orders_Skip_Take_Same_Properties() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
@__p_1='5'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [o].[OrderID], [ca].[CustomerID] AS [CustomerIDA], [cb].[CustomerID] AS [CustomerIDB], [ca].[ContactName] AS [ContactNameA], [cb].[ContactName] AS [ContactNameB]
|
|
FROM (([Orders] AS [o])
|
|
INNER JOIN [Customers] AS [ca] ON [o].[CustomerID] = [ca].[CustomerID])
|
|
INNER JOIN [Customers] AS [cb] ON [o].[CustomerID] = [cb].[CustomerID]
|
|
ORDER BY [o].[OrderID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_with_groupby() :
|
|
AssertSql(
|
|
@"SELECT (
|
|
SELECT IIf(
|
|
EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o0]
|
|
WHERE [c].[CustomerID] = [o0].[CustomerID]),
|
|
True,
|
|
False
|
|
)
|
|
FROM (SELECT COUNT(*) FROM MSysAccessStorage)
|
|
), [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')",
|
|
//
|
|
@"@_outer_CustomerID1='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o2].[OrderID], [o2].[CustomerID], [o2].[EmployeeID], [o2].[OrderDate]
|
|
FROM [Orders] AS [o2]
|
|
WHERE @_outer_CustomerID1 = [o2].[CustomerID]
|
|
ORDER BY [o2].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID1='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o2].[OrderID], [o2].[CustomerID], [o2].[EmployeeID], [o2].[OrderDate]
|
|
FROM [Orders] AS [o2]
|
|
WHERE @_outer_CustomerID1 = [o2].[CustomerID]
|
|
ORDER BY [o2].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID1='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o2].[OrderID], [o2].[CustomerID], [o2].[EmployeeID], [o2].[OrderDate]
|
|
FROM [Orders] AS [o2]
|
|
WHERE @_outer_CustomerID1 = [o2].[CustomerID]
|
|
ORDER BY [o2].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID1='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o2].[OrderID], [o2].[CustomerID], [o2].[EmployeeID], [o2].[OrderDate]
|
|
FROM [Orders] AS [o2]
|
|
WHERE @_outer_CustomerID1 = [o2].[CustomerID]
|
|
ORDER BY [o2].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_client_and_server_top_level() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <> 'AROUT'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_shadow() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[Title] = 'Sales Representative'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_project_filter() :
|
|
AssertSql(
|
|
@"SELECT [c].[CompanyName]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_select_many() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM ([Customers] AS [c])
|
|
, [Orders] AS [o]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_StartsWith_MethodCall() :
|
|
AssertSql(
|
|
@"@__LocalMethod1_0='M' (Nullable = false) (Size = 1)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[ContactName] LIKE @__LocalMethod1_0 + '%' AND (LEFT([c].[ContactName], LEN(@__LocalMethod1_0)) = @__LocalMethod1_0)) OR (@__LocalMethod1_0 = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.First_inside_subquery_gets_client_evaluated() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o0].[CustomerID]
|
|
FROM [Orders] AS [o0]
|
|
WHERE ([o0].[CustomerID] = 'ALFKI') AND (@_outer_CustomerID = [o0].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_Count_with_predicate() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition4() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT [t].[CustomerID], [t].[Address], [t].[City], [t].[CompanyName], [t].[ContactName], [t].[ContactTitle], [t].[Country], [t].[Fax], [t].[Phone], [t].[PostalCode], [t].[Region]
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t]",
|
|
//
|
|
@"SELECT 1
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID]",
|
|
//
|
|
@"SELECT [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region]
|
|
FROM [Customers] AS [c2]",
|
|
//
|
|
@"SELECT 1
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID]",
|
|
//
|
|
@"SELECT [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region]
|
|
FROM [Customers] AS [c2]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_method_string() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Filter_coalesce_operator() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE IIf(IsNull([c].[CompanyName]), [c].[ContactName], [c].[CompanyName]) = 'The Big Cheese'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_customers_orders_entities() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_Where_OrderBy() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE ([o].[CustomerID] = 'ALFKI') OR ([c].[CustomerID] = 'ANATR')
|
|
ORDER BY [c].[City]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_Subquery_Single() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT TOP @__p_0 [od].[OrderID]
|
|
FROM [Order Details] AS [od]
|
|
ORDER BY [od].[ProductID], [od].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10285'
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_OrderID = [o].[OrderID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10294'
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_OrderID = [o].[OrderID]
|
|
ORDER BY [o].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_select_many_or() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM ([Customers] AS [c])
|
|
, [Employees] AS [e]
|
|
WHERE ([c].[City] = 'London') OR ([e].[City] = 'London')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_Distinct_Count() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [t].*
|
|
FROM (
|
|
SELECT TOP @__p_0 [o].*
|
|
FROM [Orders] AS [o]
|
|
) AS [t]
|
|
) AS [t0]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bitwise_or() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (IIf(
|
|
[c].[CustomerID] = 'ALFKI',
|
|
True,
|
|
False
|
|
) BOR IIf(
|
|
[c].[CustomerID] = 'ANATR',
|
|
True,
|
|
False
|
|
)) = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_int_to_string() :
|
|
AssertSql(
|
|
@"SELECT Str([o].[OrderID]) AS [ShipName]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_is_null() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]",
|
|
//
|
|
@"@_outer_ReportsTo='2'
|
|
|
|
SELECT TOP 2 [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = @_outer_ReportsTo",
|
|
//
|
|
@"SELECT TOP 2 [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] IS NULL",
|
|
//
|
|
@"@_outer_ReportsTo='2'
|
|
|
|
SELECT TOP 2 [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = @_outer_ReportsTo");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_closure() :
|
|
AssertSql(
|
|
@"@__city_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bitwise_or_with_logical_and() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ((IIf(
|
|
[c].[CustomerID] = 'ALFKI',
|
|
True,
|
|
False
|
|
) BOR IIf(
|
|
[c].[CustomerID] = 'ANATR',
|
|
True,
|
|
False
|
|
)) = True) AND ([c].[Country] = 'Germany')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_project_filter2() :
|
|
AssertSql(
|
|
@"SELECT [c].[City]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_conditional_operator() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(
|
|
[c].[Region] IS NULL,
|
|
'ZZ',
|
|
[c].[Region]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Lifting_when_subquery_nested_order_by_simple() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT [t0].[CustomerID]
|
|
FROM (
|
|
SELECT DISTINCT [t].[CustomerID]
|
|
FROM ((
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t])
|
|
, [Customers] AS [c2]
|
|
) AS [t0]",
|
|
//
|
|
@"SELECT [c1_Orders].[OrderID], [c1_Orders].[CustomerID], [c1_Orders].[EmployeeID], [c1_Orders].[OrderDate]
|
|
FROM [Orders] AS [c1_Orders]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_complex_predicate_not_matching_ins2() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI') AND [c].[CustomerID] NOT IN ('ALFKI', 'ABCDE')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Contains_Column() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (Instr([c].[ContactName], [c].[ContactName]) > 0) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Anonymous_member_distinct_where() :
|
|
AssertSql(
|
|
@"SELECT [t].[CustomerID]
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Contains_Identity() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (Instr([c].[ContactName], [c].[ContactName]) > 0) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_null_coalesce_operator() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(IsNull([c].[Region]), 'ZZ', [c].[Region])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_reversed() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE 'London' = [c].[City]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_concat_with_navigation2() :
|
|
AssertSql(
|
|
@"SELECT ([o#Customer].[City] + ' ') + [o#Customer].[City]
|
|
FROM ([Orders] AS [o])
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_SelectMany_subquery_with_filter_orderby_and_DefaultIfEmpty() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Customers] AS [c])
|
|
LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_SelectMany_subquery_with_filter() :
|
|
AssertSql(
|
|
@"SELECT [c].[ContactName], [t].[OrderID]
|
|
FROM ([Customers] AS [c])
|
|
INNER JOIN (
|
|
SELECT [o].*
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderID] > 5
|
|
) AS [t] ON [c].[CustomerID] = [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_Where_Count() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_EndsWith_Literal() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE RIGHT([c].[ContactName], LEN('b')) = 'b'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_static_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__StaticFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__StaticFieldValue_0",
|
|
//
|
|
@"@__StaticFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__StaticFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested_negated3() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE NOT EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A')) AND (([c].[City] <> 'London') OR [c].[City] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_subquery_involving_join_binds_to_correct_table() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] > 11000) AND [o].[OrderID] IN (
|
|
SELECT [od].[OrderID]
|
|
FROM ([Order Details] AS [od])
|
|
INNER JOIN [Products] AS [od#Product] ON [od].[ProductID] = [od#Product].[ProductID]
|
|
WHERE [od#Product].[ProductName] = 'Chai'
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_not_in_optimization2() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM ([Customers] AS [c])
|
|
, [Employees] AS [e]
|
|
WHERE [c].[City] NOT IN ('London', 'Berlin')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition2() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]",
|
|
//
|
|
@"SELECT TOP 1 [e0].[EmployeeID], [e0].[City], [e0].[Country], [e0].[FirstName], [e0].[ReportsTo], [e0].[Title]
|
|
FROM [Employees] AS [e0]
|
|
ORDER BY [e0].[EmployeeID]",
|
|
//
|
|
@"SELECT TOP 1 [e0].[EmployeeID], [e0].[City], [e0].[Country], [e0].[FirstName], [e0].[ReportsTo], [e0].[Title]
|
|
FROM [Employees] AS [e0]
|
|
ORDER BY [e0].[EmployeeID]",
|
|
//
|
|
@"SELECT TOP 1 [e0].[EmployeeID], [e0].[City], [e0].[Country], [e0].[FirstName], [e0].[ReportsTo], [e0].[Title]
|
|
FROM [Employees] AS [e0]
|
|
ORDER BY [e0].[EmployeeID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_correlated_subquery_ordered() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID]
|
|
FROM [Customers] AS [c]",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_select_many() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM (([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])
|
|
, [Employees] AS [e]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_in_complex_predicate() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE (([p].[ProductID] > 100) AND ([p].[Discontinued] = True)) OR ([p].[Discontinued] = True)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_DTO_with_member_init_distinct_in_subquery_used_in_projection_translated_to_server() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [t].[Id], [t].[Count]
|
|
FROM ([Customers] AS [c])
|
|
, (
|
|
SELECT DISTINCT [o].[CustomerID] AS [Id], [o].[OrderID] AS [Count]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderID] < 10300
|
|
) AS [t]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_take_max() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT MAX([t].[OrderID])
|
|
FROM (
|
|
SELECT TOP @__p_0 [o].[OrderID]
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.SelectMany_LongCount() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM ([Customers] AS [c])
|
|
, [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_list_inline() : line() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 6247
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.IsNullOrEmpty_in_predicate() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[Region] IS NULL OR ([c].[Region] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_closure_constant() :
|
|
AssertSql(
|
|
@"@__predicate_0='True'
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE @__predicate_0 = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_customers_orders_with_subquery_anonymous_property_method_with_take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT [t].[OrderID], [t].[CustomerID], [t].[EmployeeID], [t].[OrderDate]
|
|
FROM (
|
|
SELECT TOP @__p_0 [o2].[OrderID], [o2].[CustomerID], [o2].[EmployeeID], [o2].[OrderDate]
|
|
FROM [Orders] AS [o2]
|
|
ORDER BY [o2].[OrderID]
|
|
) AS [t]",
|
|
//
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_simple() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_customers_orders_projection() :
|
|
AssertSql(
|
|
@"SELECT [c].[ContactName], [o].[OrderID]
|
|
FROM ([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_multi_level5() :
|
|
AssertSql(
|
|
@"SELECT (
|
|
SELECT TOP 1 (
|
|
SELECT TOP 1 [od].[ProductID]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] <> (
|
|
SELECT COUNT(*)
|
|
FROM [Orders] AS [o0]
|
|
WHERE [c].[CustomerID] = [o0].[CustomerID]
|
|
)) AND ([o].[OrderID] = [od].[OrderID])
|
|
)
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND ([c].[CustomerID] = [o].[CustomerID])
|
|
) AS [Order]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_SelectMany_subquery_with_filter_orderby() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Customers] AS [c])
|
|
LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested_negated2() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (([c].[City] <> 'London') OR [c].[City] IS NULL) AND NOT EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_subquery_projection() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT TOP @__p_0 [c].[City]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_arg_expression() :
|
|
AssertSql(
|
|
@"SELECT AVG(CDbl(IIf(IsNull([o].[OrderID] + [o].[OrderID]),0,[o].[OrderID] + [o].[OrderID])))
|
|
FROM [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_negated_twice() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_one_element_SingleOrDefault() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]",
|
|
//
|
|
@"@_outer_ReportsTo='2'
|
|
|
|
SELECT TOP 2 [e20].[EmployeeID]
|
|
FROM [Employees] AS [e20]
|
|
WHERE [e20].[EmployeeID] = @_outer_ReportsTo",
|
|
//
|
|
@"SELECT TOP 2 [e20].[EmployeeID]
|
|
FROM [Employees] AS [e20]
|
|
WHERE [e20].[EmployeeID] IS NULL",
|
|
//
|
|
@"@_outer_ReportsTo='2'
|
|
|
|
SELECT TOP 2 [e20].[EmployeeID]
|
|
FROM [Employees] AS [e20]
|
|
WHERE [e20].[EmployeeID] = @_outer_ReportsTo");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_math_round_int() :
|
|
AssertSql(
|
|
@"SELECT ROUND(CDbl(IIf(IsNull([o].[OrderID]),0,[o].[OrderID])), 0) AS [A]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderID] < 10250");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_count_using_DTO() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID] AS [Id], (
|
|
SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE [c].[CustomerID] = [o].[CustomerID]
|
|
) AS [Count]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Anonymous_complex_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] + [c].[City] AS [A]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[A] LIKE 'A' + '%' AND (LEFT([t].[A], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_OrderBy_Count() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT COUNT(*)
|
|
FROM (
|
|
SELECT TOP @__p_0 [o].*
|
|
FROM [Orders] AS [o]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_EndsWith_Column() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (RIGHT([c].[ContactName], LEN([c].[ContactName])) = [c].[ContactName]) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_tracking_groups() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Customers] AS [c])
|
|
LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bitwise_and_with_logical_and() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ((IIf(
|
|
[c].[CustomerID] = 'ALFKI',
|
|
True,
|
|
False
|
|
) BAND IIf(
|
|
[c].[CustomerID] = 'ANATR',
|
|
True,
|
|
False
|
|
)) = True) AND ([c].[CustomerID] = 'ANTON')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_null_coalesce_operator() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[CompanyName], IIf(IsNull([c].[Region]), 'ZZ', [c].[Region]) AS [Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [Region]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.SelectMany_simple_subquery() :
|
|
AssertSql(
|
|
@"@__p_0='9'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title], [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM ((
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
) AS [t])
|
|
, [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Projection_null_coalesce_operator() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[CompanyName], IIf(IsNull([c].[Region]), 'ZZ', [c].[Region]) AS [Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_parameter() :
|
|
AssertSql(
|
|
@"@__prm_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE @__prm_0 = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Null_conditional_deep() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE CInt(IIf(IsNull(LEN([c].[CustomerID])),0,LEN([c].[CustomerID]))) = 5");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_not_in_optimization4() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM ([Customers] AS [c])
|
|
, [Employees] AS [e]
|
|
WHERE [c].[City] NOT IN ('London', 'Berlin', 'Seattle', 'Lisboa')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_concat_with_navigation1() :
|
|
AssertSql(
|
|
@"SELECT ([o].[CustomerID] + ' ') + [o#Customer].[City]
|
|
FROM ([Orders] AS [o])
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_member_distinct_where() :
|
|
AssertSql(
|
|
@"SELECT [t].[Property]
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] AS [Property]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[Property] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Queryable_simple_anonymous_subquery() :
|
|
AssertSql(
|
|
@"@__p_0='91'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Sum_on_float_column_in_subquery() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], (
|
|
SELECT CSng(IIf(IsNull(SUM([od].[Discount])),0,SUM([od].[Discount])))
|
|
FROM [Order Details] AS [od]
|
|
WHERE [o].[OrderID] = [od].[OrderID]
|
|
) AS [Sum]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderID] < 10300");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_orderBy_take_count() :
|
|
AssertSql(
|
|
@"@__p_0='7'
|
|
|
|
SELECT COUNT(*)
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[Country]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_multi_level3() :
|
|
AssertSql(
|
|
@"SELECT (
|
|
SELECT TOP 1 [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND ([c].[CustomerID] = [o].[CustomerID])
|
|
) AS [OrderDates]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_simple() :
|
|
AssertSql(
|
|
@"SELECT IIf(
|
|
EXISTS (
|
|
SELECT 1
|
|
FROM [Customers] AS [c]),
|
|
True,
|
|
False
|
|
)
|
|
FROM (SELECT COUNT(*) FROM MSysAccessStorage)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.SelectMany_Count() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM ([Customers] AS [c])
|
|
, [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_shadow_subquery_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[Title] = (
|
|
SELECT TOP 1 [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
ORDER BY [e2].[Title]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_Where_Count() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM ([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_take_min() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT MIN([t].[OrderID])
|
|
FROM (
|
|
SELECT TOP @__p_0 [o].[OrderID]
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_false() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupBy_join_default_if_empty_anonymous() :
|
|
AssertSql(
|
|
@"SELECT [order0].[OrderID], [order0].[CustomerID], [order0].[EmployeeID], [order0].[OrderDate], [orderDetail0].[OrderID], [orderDetail0].[ProductID], [orderDetail0].[Discount], [orderDetail0].[Quantity], [orderDetail0].[UnitPrice]
|
|
FROM ([Orders] AS [order0])
|
|
LEFT JOIN [Order Details] AS [orderDetail0] ON [order0].[OrderID] = [orderDetail0].[OrderID]
|
|
ORDER BY [order0].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Orderby_added_for_client_side_GroupJoin_principal_to_dependent_LOJ() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City] AS [City1], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title], [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM ([Employees] AS [e1])
|
|
LEFT JOIN [Employees] AS [e2] ON [e1].[EmployeeID] = [e2].[ReportsTo]
|
|
ORDER BY [e1].[EmployeeID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_member_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] AS [Property]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[Property] LIKE 'A' + '%' AND (LEFT([t].[Property], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_same_collection_force_alias_uniquefication() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM ([Orders] AS [o])
|
|
INNER JOIN [Orders] AS [o0] ON [o].[CustomerID] = [o0].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_using_int_overload_on_mismatched_types() :
|
|
AssertSql(
|
|
@"@__shortPrm_0='1'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[EmployeeID] = @__shortPrm_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_join_orderby_join_select() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM (([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])
|
|
INNER JOIN [Order Details] AS [od] ON [o].[OrderID] = [od].[OrderID]
|
|
WHERE [c].[CustomerID] <> 'ALFKI'
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_EndsWith_Identity() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (RIGHT([c].[ContactName], LEN([c].[ContactName])) = [c].[ContactName]) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_de_morgan_and_optimizated() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ([p].[Discontinued] = False) OR ([p].[ProductID] >= 20)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Local_array() :
|
|
AssertSql(
|
|
@"@__get_Item_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = @__get_Item_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_Customers_Orders_Skip_Take() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
@__p_1='5'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [c].[ContactName], [o].[OrderID]
|
|
FROM ([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_All() :
|
|
AssertSql(
|
|
@"SELECT IIf(
|
|
NOT EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[CustomerID] <> 'ALFKI') OR [o].[CustomerID] IS NULL),
|
|
True,
|
|
False
|
|
)
|
|
FROM (SELECT COUNT(*) FROM MSysAccessStorage)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_long_to_string() :
|
|
AssertSql(
|
|
@"SELECT Str([o].[OrderID]) AS [ShipName]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_GroupJoin_DefaultIfEmpty_Where() :
|
|
AssertSql(
|
|
@"SELECT [o2].[OrderID], [o2].[CustomerID], [o2].[EmployeeID], [o2].[OrderDate]
|
|
FROM (([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])
|
|
LEFT JOIN [Orders] AS [o2] ON [c].[CustomerID] = [o2].[CustomerID]
|
|
WHERE [o2].[OrderID] IS NOT NULL AND ([o2].[CustomerID] = 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_no_arg() :
|
|
AssertSql(
|
|
@"SELECT AVG(CDbl(IIf(IsNull([o].[OrderID]),0,[o].[OrderID])))
|
|
FROM [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Distinct_Take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT TOP @__p_0 [t].[OrderID], [t].[CustomerID], [t].[EmployeeID], [t].[OrderDate]
|
|
FROM (
|
|
SELECT DISTINCT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
) AS [t]
|
|
ORDER BY [t].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_sql_injection() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ALFKI', 'ABC'')); GO; DROP TABLE Orders; GO; --', 'ALFKI', 'ABCDE')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested3() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A')) AND (([c].[City] <> 'London') OR [c].[City] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.SelectMany_projection1() :
|
|
AssertSql(
|
|
@"SELECT [e1].[City], [e2].[Country]
|
|
FROM ([Employees] AS [e1])
|
|
, [Employees] AS [e2]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_EndsWith_MethodCall() :
|
|
AssertSql(
|
|
@"@__LocalMethod2_0='m' (Nullable = false) (Size = 1)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (RIGHT([c].[ContactName], LEN(@__LocalMethod2_0)) = @__LocalMethod2_0) OR (@__LocalMethod2_0 = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_with_different_outer_elements_with_same_key() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM ([Orders] AS [o])
|
|
LEFT JOIN [Customers] AS [c] ON [o].[CustomerID] = [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_0",
|
|
//
|
|
@"@__city_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_expression_invoke() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition2_FirstOrDefault() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]
|
|
WHERE [t].[FirstName] = (
|
|
SELECT TOP 1 [e0].[FirstName]
|
|
FROM [Employees] AS [e0]
|
|
ORDER BY [e0].[EmployeeID]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Anonymous_member_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[CustomerID] LIKE 'A' + '%' AND (LEFT([t].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_Customers_Orders_Projection_With_String_Concat_Skip_Take() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
@__p_1='5'
|
|
|
|
SELECT TOP @__p_1+@__p_0 ([c].[ContactName] + ' ') + [c].[ContactTitle] AS [Contact], [o].[OrderID]
|
|
FROM ([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_select_many_or3() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM ([Customers] AS [c])
|
|
, [Employees] AS [e]
|
|
WHERE [c].[City] IN ('London', 'Berlin', 'Seattle')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_compared_to_binary_expression() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = IIf(
|
|
[p].[ProductID] > 50,
|
|
True,
|
|
False
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Null_conditional_simple() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_comparison_to_nullable_bool() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE RIGHT([c].[CustomerID], LEN('KI')) = 'KI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bitwise_or_with_logical_or() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ((IIf(
|
|
[c].[CustomerID] = 'ALFKI',
|
|
True,
|
|
False
|
|
) BOR IIf(
|
|
[c].[CustomerID] = 'ANATR',
|
|
True,
|
|
False
|
|
)) = True) OR ([c].[CustomerID] = 'ANTON')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_subquery_and_local_array_closure() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Customers] AS [c1]
|
|
WHERE [c1].[City] IN ('London', 'Buenos Aires') AND ([c1].[CustomerID] = [c].[CustomerID]))",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Customers] AS [c1]
|
|
WHERE [c1].[City] IN ('London') AND ([c1].[CustomerID] = [c].[CustomerID]))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Lifting_when_subquery_nested_order_by_anonymous() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT [c1_Orders].[OrderID], [c1_Orders].[CustomerID], [c1_Orders].[EmployeeID], [c1_Orders].[OrderDate], [t0].[CustomerID]
|
|
FROM ([Orders] AS [c1_Orders])
|
|
INNER JOIN (
|
|
SELECT DISTINCT [t].[CustomerID]
|
|
FROM ((
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t])
|
|
, [Customers] AS [c2]
|
|
) AS [t0] ON [c1_Orders].[CustomerID] = [t0].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Distinct_Take_Count() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT TOP @__p_0 [o].*
|
|
FROM [Orders] AS [o]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_many_cross_join_same_collection() :
|
|
AssertSql(
|
|
@"SELECT [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region]
|
|
FROM ([Customers] AS [c])
|
|
, [Customers] AS [c0]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_arg() :
|
|
AssertSql(
|
|
@"SELECT AVG(CDbl(IIf(IsNull([o].[OrderID]),0,[o].[OrderID])))
|
|
FROM [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_bitwise_or_with_logical_or() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], IIf(
|
|
((IIf(
|
|
[c].[CustomerID] = 'ALFKI',
|
|
True,
|
|
False
|
|
) BOR IIf(
|
|
[c].[CustomerID] = 'ANATR',
|
|
True,
|
|
False
|
|
)) = True) OR ([c].[CustomerID] = 'ANTON'),
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_LastOrDefault() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = 'London'
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Contains_Literal() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE Instr([c].[ContactName], 'M') > 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_on_mismatched_types_nullable_int_long() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True",
|
|
//
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_simple3() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID]
|
|
FROM ([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_false() :
|
|
AssertSql(
|
|
@"@__flag_0='False'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ((@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)) OR ((@__flag_0 <> True) AND ([p].[UnitsInStock] < 20))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_division_on_decimal_no_significant_digits() :
|
|
AssertSql(
|
|
@"SELECT AVG(CCur(IIf(IsNull([od].[Quantity] / 2.0),0,[od].[Quantity] / 2.0)))
|
|
FROM [Order Details] AS [od]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Sum_with_coalesce() :
|
|
AssertSql(
|
|
@"SELECT SUM(IIf(IsNull([p].[UnitPrice]), 0.0, [p].[UnitPrice]))
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[ProductID] < 40");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_concat_string_int_comparison1() :
|
|
AssertSql(
|
|
@"@__i_0='10'
|
|
|
|
SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[CustomerID] + (@__i_0&"""")) = [c].[CompanyName]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Single_Predicate() :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Take_simple_parameterized() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_complex_predicate_or() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', 'ALFKI', 'ALFKI', 'ABCDE')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_select_many_and() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM ([Customers] AS [c])
|
|
, [Employees] AS [e]
|
|
WHERE (([c].[City] = 'London') AND ([c].[Country] = 'UK')) AND (([e].[City] = 'London') AND ([e].[Country] = 'UK'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_with_multiple_conditions_still_uses_exists() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[City] = 'London') AND EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[EmployeeID] = 1) AND ([c].[CustomerID] = [o].[CustomerID]))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.No_orderby_added_for_fully_translated_manually_constructed_LOJ() :
|
|
AssertSql(
|
|
@"SELECT [e1].[City] AS [City1], [e2].[City] AS [City2]
|
|
FROM ([Employees] AS [e1])
|
|
LEFT JOIN [Employees] AS [e2] ON [e1].[EmployeeID] = [e2].[ReportsTo]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Anonymous_complex_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] + [c].[City] AS [A]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[A] LIKE 'A' + '%' AND (LEFT([t].[A], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Anonymous_member_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[CustomerID] LIKE 'A' + '%' AND (LEFT([t].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested_negated3() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE NOT EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A')) AND (([c].[City] <> 'London') OR [c].[City] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_subquery_involving_join_binds_to_correct_table() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] > 11000) AND [o].[OrderID] IN (
|
|
SELECT [od].[OrderID]
|
|
FROM ([Order Details] AS [od])
|
|
INNER JOIN [Products] AS [od#Product] ON [od].[ProductID] = [od#Product].[ProductID]
|
|
WHERE [od#Product].[ProductName] = 'Chai'
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested_negated2() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (([c].[City] <> 'London') OR [c].[City] IS NULL) AND NOT EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_arg_expression() :
|
|
AssertSql(
|
|
@"SELECT AVG(CDbl(IIf(IsNull([o].[OrderID] + [o].[OrderID]),0,[o].[OrderID] + [o].[OrderID])))
|
|
FROM [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_simple() :
|
|
AssertSql(
|
|
@"SELECT IIf(
|
|
EXISTS (
|
|
SELECT 1
|
|
FROM [Customers] AS [c]),
|
|
True,
|
|
False
|
|
)
|
|
FROM (SELECT COUNT(*) FROM MSysAccessStorage)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_no_arg() :
|
|
AssertSql(
|
|
@"SELECT AVG(CDbl(IIf(IsNull([o].[OrderID]),0,[o].[OrderID])))
|
|
FROM [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested3() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A')) AND (([c].[City] <> 'London') OR [c].[City] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_arg() :
|
|
AssertSql(
|
|
@"SELECT AVG(CDbl(IIf(IsNull([o].[OrderID]),0,[o].[OrderID])))
|
|
FROM [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_division_on_decimal_no_significant_digits() :
|
|
AssertSql(
|
|
@"SELECT AVG(CCur(IIf(IsNull([od].[Quantity] / 2.0),0,[od].[Quantity] / 2.0)))
|
|
FROM [Order Details] AS [od]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_on_float_column_in_subquery() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderID] < 10300",
|
|
//
|
|
@"@_outer_OrderID='10248'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10249'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10250'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10251'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10252'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10253'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10254'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10255'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]");
|
|
|
|
Output truncated.
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_on_float_column() :
|
|
AssertSql(
|
|
@"SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od].[Discount]),0,[od].[Discount])))),0,AVG(CSng(IIf(IsNull([od].[Discount]),0,[od].[Discount])))))
|
|
FROM [Order Details] AS [od]
|
|
WHERE [od].[ProductID] = 1");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Complex_query_with_repeated_query_model_compiles_correctly() :
|
|
AssertSql(
|
|
@"SELECT [outer].[CustomerID], [outer].[Address], [outer].[City], [outer].[CompanyName], [outer].[ContactName], [outer].[ContactTitle], [outer].[Country], [outer].[Fax], [outer].[Phone], [outer].[PostalCode], [outer].[Region]
|
|
FROM [Customers] AS [outer]
|
|
WHERE [outer].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT IIf(
|
|
EXISTS (
|
|
SELECT 1
|
|
FROM [Customers] AS [c0]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Customers] AS [cc1])),
|
|
True,
|
|
False
|
|
)
|
|
FROM (SELECT COUNT(*) FROM MSysAccessStorage)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Complex_query_with_repeated_nested_query_model_compiles_correctly() :
|
|
AssertSql(
|
|
@"SELECT [outer].[CustomerID], [outer].[Address], [outer].[City], [outer].[CompanyName], [outer].[ContactName], [outer].[ContactTitle], [outer].[Country], [outer].[Fax], [outer].[Phone], [outer].[PostalCode], [outer].[Region]
|
|
FROM [Customers] AS [outer]
|
|
WHERE [outer].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT IIf(
|
|
EXISTS (
|
|
SELECT 1
|
|
FROM [Customers] AS [c0]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Customers] AS [cc1]
|
|
WHERE EXISTS (
|
|
SELECT DISTINCT 1
|
|
FROM (
|
|
SELECT TOP 10 [inner1].*
|
|
FROM [Customers] AS [inner1]
|
|
ORDER BY [inner1].[CustomerID]
|
|
) AS [t1]))),
|
|
True,
|
|
False
|
|
)
|
|
FROM (SELECT COUNT(*) FROM MSysAccessStorage)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested_negated() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE NOT EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_coalesce() :
|
|
AssertSql(
|
|
@"SELECT AVG(CCur(IIf(IsNull(IIf(IsNull([p].[UnitPrice]), 0.0, [p].[UnitPrice])),0,IIf(IsNull([p].[UnitPrice]), 0.0, [p].[UnitPrice]))))
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[ProductID] < 40");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_division_on_decimal() :
|
|
AssertSql(
|
|
@"SELECT AVG(CCur(IIf(IsNull([od].[Quantity] / 2.09),0,[od].[Quantity] / 2.09)))
|
|
FROM [Order Details] AS [od]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_predicate() :
|
|
AssertSql(
|
|
@"SELECT IIf(
|
|
EXISTS (
|
|
SELECT 1
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[ContactName] LIKE 'A' + '%' AND (LEFT([c].[ContactName], LEN('A')) = 'A')),
|
|
True,
|
|
False
|
|
)
|
|
FROM (SELECT COUNT(*) FROM MSysAccessStorage)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_top_level() :
|
|
AssertSql(
|
|
@"@__p_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT IIf(
|
|
@__p_0 IN (
|
|
SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
),
|
|
True,
|
|
False
|
|
)
|
|
FROM (SELECT COUNT(*) FROM MSysAccessStorage)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested2() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (([c].[City] <> 'London') OR [c].[City] IS NULL) AND EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_list_inline_closure_mix() : line_closure_mix() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 6247
|
|
AssertSql(
|
|
@"@__id_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', @__id_0)",
|
|
//
|
|
@"@__id_0='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] IN ('ABCDE', @__id_0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_binary_expression() :
|
|
AssertSql(
|
|
@"SELECT AVG(CDbl(IIf(IsNull([o].[OrderID] * 2),0,[o].[OrderID] * 2)))
|
|
FROM [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_simple() :
|
|
AssertSql(
|
|
@"SELECT IIf(
|
|
EXISTS (
|
|
SELECT 1
|
|
FROM [Customers] AS [c]),
|
|
True,
|
|
False
|
|
)
|
|
FROM (SELECT COUNT(*) FROM MSysAccessStorage)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_predicate() :
|
|
AssertSql(
|
|
@"SELECT IIf(
|
|
EXISTS (
|
|
SELECT 1
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[ContactName] LIKE 'A' + '%' AND (LEFT([c].[ContactName], LEN('A')) = 'A')),
|
|
True,
|
|
False
|
|
)
|
|
FROM (SELECT COUNT(*) FROM MSysAccessStorage)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_arg_expression() :
|
|
AssertSql(
|
|
@"SELECT AVG(CDbl(IIf(IsNull([o].[OrderID] + [o].[OrderID]),0,[o].[OrderID] + [o].[OrderID])))
|
|
FROM [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_no_arg() :
|
|
AssertSql(
|
|
@"SELECT AVG(CDbl(IIf(IsNull([o].[OrderID]),0,[o].[OrderID])))
|
|
FROM [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_arg() :
|
|
AssertSql(
|
|
@"SELECT AVG(CDbl(IIf(IsNull([o].[OrderID]),0,[o].[OrderID])))
|
|
FROM [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_division_on_decimal_no_significant_digits() :
|
|
AssertSql(
|
|
@"SELECT AVG(CCur(IIf(IsNull([od].[Quantity] / 2.0),0,[od].[Quantity] / 2.0)))
|
|
FROM [Order Details] AS [od]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_on_float_column_in_subquery() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderID] < 10300",
|
|
//
|
|
@"@_outer_OrderID='10248'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10249'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10250'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10251'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10252'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10253'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10254'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]",
|
|
//
|
|
@"@_outer_OrderID='10255'
|
|
|
|
SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))),0,AVG(CSng(IIf(IsNull([od0].[Discount]),0,[od0].[Discount])))))
|
|
FROM [Order Details] AS [od0]
|
|
WHERE @_outer_OrderID = [od0].[OrderID]");
|
|
|
|
Output truncated.
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_on_float_column() :
|
|
AssertSql(
|
|
@"SELECT CSng(IIf(IsNull(AVG(CSng(IIf(IsNull([od].[Discount]),0,[od].[Discount])))),0,AVG(CSng(IIf(IsNull([od].[Discount]),0,[od].[Discount])))))
|
|
FROM [Order Details] AS [od]
|
|
WHERE [od].[ProductID] = 1");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_coalesce() :
|
|
AssertSql(
|
|
@"SELECT AVG(CCur(IIf(IsNull(IIf(IsNull([p].[UnitPrice]), 0.0, [p].[UnitPrice])),0,IIf(IsNull([p].[UnitPrice]), 0.0, [p].[UnitPrice]))))
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[ProductID] < 40");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_division_on_decimal() :
|
|
AssertSql(
|
|
@"SELECT AVG(CCur(IIf(IsNull([od].[Quantity] / 2.09),0,[od].[Quantity] / 2.09)))
|
|
FROM [Order Details] AS [od]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_binary_expression() :
|
|
AssertSql(
|
|
@"SELECT AVG(CDbl(IIf(IsNull([o].[OrderID] * 2),0,[o].[OrderID] * 2)))
|
|
FROM [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_no_arg() :
|
|
AssertSql(
|
|
@"SELECT AVG(CDbl(IIf(IsNull([o].[OrderID]),0,[o].[OrderID])))
|
|
FROM [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Average_with_binary_expression() :
|
|
AssertSql(
|
|
@"SELECT AVG(CDbl(IIf(IsNull([o].[OrderID] * 2),0,[o].[OrderID] * 2)))
|
|
FROM [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.First_inside_subquery_gets_client_evaluated() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o0].[CustomerID]
|
|
FROM [Orders] AS [o0]
|
|
WHERE ([o0].[CustomerID] = 'ALFKI') AND (@_outer_CustomerID = [o0].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Filter_coalesce_operator() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE IIf(IsNull([c].[CompanyName]), [c].[ContactName], [c].[CompanyName]) = 'The Big Cheese'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_Where_OrderBy() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE ([o].[CustomerID] = 'ALFKI') OR ([c].[CustomerID] = 'ANATR')
|
|
ORDER BY [c].[City]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_SelectMany_subquery_with_filter_orderby_and_DefaultIfEmpty() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Customers] AS [c])
|
|
LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_SelectMany_subquery_with_filter() :
|
|
AssertSql(
|
|
@"SELECT [c].[ContactName], [t].[OrderID]
|
|
FROM ([Customers] AS [c])
|
|
INNER JOIN (
|
|
SELECT [o].*
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderID] > 5
|
|
) AS [t] ON [c].[CustomerID] = [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_SelectMany_subquery_with_filter_orderby() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Customers] AS [c])
|
|
LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_tracking_groups() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Customers] AS [c])
|
|
LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupBy_join_default_if_empty_anonymous() :
|
|
AssertSql(
|
|
@"SELECT [order0].[OrderID], [order0].[CustomerID], [order0].[EmployeeID], [order0].[OrderDate], [orderDetail0].[OrderID], [orderDetail0].[ProductID], [orderDetail0].[Discount], [orderDetail0].[Quantity], [orderDetail0].[UnitPrice]
|
|
FROM ([Orders] AS [order0])
|
|
LEFT JOIN [Order Details] AS [orderDetail0] ON [order0].[OrderID] = [orderDetail0].[OrderID]
|
|
ORDER BY [order0].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_member_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] AS [Property]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[Property] LIKE 'A' + '%' AND (LEFT([t].[Property], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Distinct_Take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT TOP @__p_0 [t].[OrderID], [t].[CustomerID], [t].[EmployeeID], [t].[OrderDate]
|
|
FROM (
|
|
SELECT DISTINCT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
) AS [t]
|
|
ORDER BY [t].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_with_different_outer_elements_with_same_key() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM ([Orders] AS [o])
|
|
LEFT JOIN [Customers] AS [c] ON [o].[CustomerID] = [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Distinct_Take_Count() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT TOP @__p_0 [o].*
|
|
FROM [Orders] AS [o]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_simple3() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID]
|
|
FROM ([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_simple_subquery() :
|
|
AssertSql(
|
|
@"@__p_0='4'
|
|
|
|
SELECT [t].[OrderID], [t].[CustomerID], [t].[EmployeeID], [t].[OrderDate]
|
|
FROM ([Customers] AS [c])
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]
|
|
) AS [t] ON [c].[CustomerID] = [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_DefaultIfEmpty_multiple() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o1].[OrderID], [o1].[CustomerID], [o1].[EmployeeID], [o1].[OrderDate], [o2].[OrderID], [o2].[CustomerID], [o2].[EmployeeID], [o2].[OrderDate]
|
|
FROM (([Customers] AS [c])
|
|
LEFT JOIN [Orders] AS [o1] ON [c].[CustomerID] = [o1].[CustomerID])
|
|
LEFT JOIN [Orders] AS [o2] ON [c].[CustomerID] = [o2].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_DefaultIfEmpty2() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Employees] AS [e])
|
|
LEFT JOIN [Orders] AS [o] ON [e].[EmployeeID] = [o].[EmployeeID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_SelectMany_subquery_with_filter_and_DefaultIfEmpty() :
|
|
AssertSql(
|
|
@"SELECT [t].[OrderID], [t].[CustomerID], [t].[EmployeeID], [t].[OrderDate], [c].[ContactName]
|
|
FROM ([Customers] AS [c])
|
|
LEFT JOIN (
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderID] > 5
|
|
) AS [t] ON [c].[CustomerID] = [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.IsNullOrEmpty_in_projection() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID] AS [Id], IIf(
|
|
[c].[Region] IS NULL OR ([c].[Region] = ''),
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_DefaultIfEmpty_Where() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Customers] AS [c])
|
|
LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [o].[OrderID] IS NOT NULL AND ([o].[CustomerID] = 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.FirstOrDefault_inside_subquery_gets_server_evaluated() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE ([c].[CustomerID] = 'ALFKI') AND ((
|
|
SELECT TOP 1 [o].[CustomerID]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[CustomerID] = 'ALFKI') AND ([c].[CustomerID] = [o].[CustomerID])
|
|
) = 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_DefaultIfEmpty3() :
|
|
AssertSql(
|
|
@"@__p_0='1'
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ((
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t])
|
|
LEFT JOIN [Orders] AS [o] ON [t].[CustomerID] = [o].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupBy_join_anonymous() :
|
|
AssertSql(
|
|
@"SELECT [order0].[OrderID], [order0].[CustomerID], [order0].[EmployeeID], [order0].[OrderDate], [orderDetail0].[OrderID], [orderDetail0].[ProductID], [orderDetail0].[Discount], [orderDetail0].[Quantity], [orderDetail0].[UnitPrice]
|
|
FROM ([Orders] AS [order0])
|
|
LEFT JOIN [Order Details] AS [orderDetail0] ON [order0].[OrderID] = [orderDetail0].[OrderID]
|
|
ORDER BY [order0].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_simple2() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM ([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_simple() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_DefaultIfEmpty_Project() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID]
|
|
FROM ([Customers] AS [c])
|
|
LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_complex_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] + [c].[City] AS [Property]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[Property] LIKE 'A' + '%' AND (LEFT([t].[Property], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Entity_equality_local() :
|
|
AssertSql(
|
|
@"@__local_0_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = @__local_0_CustomerID");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_customers_orders_count() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Customers] AS [c])
|
|
LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_with_different_outer_elements_with_same_key_projected_from_another_entity() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice], [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM (([Order Details] AS [od])
|
|
INNER JOIN [Orders] AS [od#Order] ON [od].[OrderID] = [od#Order].[OrderID])
|
|
LEFT JOIN [Customers] AS [c] ON [od#Order].[CustomerID] = [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Does_not_change_ordering_of_projection_with_complex_projections() :
|
|
AssertSql(
|
|
@"SELECT [e].[CustomerID] AS [Id], (
|
|
SELECT COUNT(*)
|
|
FROM [Orders] AS [o0]
|
|
WHERE [e].[CustomerID] = [o0].[CustomerID]
|
|
) AS [TotalOrders]
|
|
FROM [Customers] AS [e]
|
|
WHERE ([e].[ContactTitle] = 'Owner') AND ((
|
|
SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
WHERE [e].[CustomerID] = [o].[CustomerID]
|
|
) > 2)
|
|
ORDER BY [e].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_with_different_outer_elements_with_same_key_with_predicate() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM ([Orders] AS [o])
|
|
LEFT JOIN [Customers] AS [c] ON [o].[CustomerID] = [c].[CustomerID]
|
|
WHERE [o].[OrderID] > 11500");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_simple_ordering() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
ORDER BY [c].[City]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_DefaultIfEmpty() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Customers] AS [c])
|
|
LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_Where() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID]
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Environment_newline_is_funcletized() : line_is_funcletized() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 6374
|
|
AssertSql(
|
|
@"@__NewLine_0='
|
|
' (Nullable = false) (Size = 2)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (Instr([c].[CustomerID], @__NewLine_0) > 0) OR (@__NewLine_0 = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupBy_LongCount() :
|
|
AssertSql(
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM ([Orders] AS [o0])
|
|
|
|
ORDER BY [o0].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Let_any_subquery_anonymous() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM ([Customers] AS [c])
|
|
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT IIf(
|
|
EXISTS (
|
|
SELECT 1
|
|
FROM ([Orders] AS [o0])
|
|
|
|
WHERE [o0].[CustomerID] = @_outer_CustomerID),
|
|
True,
|
|
False
|
|
)
|
|
FROM (SELECT COUNT(*) FROM MSysAccessStorage)",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT IIf(
|
|
EXISTS (
|
|
SELECT 1
|
|
FROM ([Orders] AS [o0])
|
|
|
|
WHERE [o0].[CustomerID] = @_outer_CustomerID),
|
|
True,
|
|
False
|
|
)
|
|
FROM (SELECT COUNT(*) FROM MSysAccessStorage)",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT IIf(
|
|
EXISTS (
|
|
SELECT 1
|
|
FROM ([Orders] AS [o0])
|
|
|
|
WHERE [o0].[CustomerID] = @_outer_CustomerID),
|
|
True,
|
|
False
|
|
)
|
|
FROM (SELECT COUNT(*) FROM MSysAccessStorage)",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT IIf(
|
|
EXISTS (
|
|
SELECT 1
|
|
FROM ([Orders] AS [o0])
|
|
|
|
WHERE [o0].[CustomerID] = @_outer_CustomerID),
|
|
True,
|
|
False
|
|
)
|
|
FROM (SELECT COUNT(*) FROM MSysAccessStorage)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_customers_orders_entities() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM (([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_Where_OrderBy() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM (([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])
|
|
|
|
WHERE ([o].[CustomerID] = 'ALFKI') OR ([c].[CustomerID] = 'ANATR')
|
|
ORDER BY [c].[City]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Lifting_when_subquery_nested_order_by_simple() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT [t0].[CustomerID]
|
|
FROM ((
|
|
SELECT DISTINCT [t].[CustomerID]
|
|
FROM ((
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM ([Customers] AS [c])
|
|
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t])
|
|
, [Customers] AS [c2]
|
|
|
|
) AS [t0])",
|
|
//
|
|
@"SELECT [c1_Orders].[OrderID], [c1_Orders].[CustomerID], [c1_Orders].[EmployeeID], [c1_Orders].[OrderDate]
|
|
FROM ([Orders] AS [c1_Orders])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_SelectMany_subquery_with_filter_orderby_and_DefaultIfEmpty() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM (([Customers] AS [c])
|
|
LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])
|
|
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_SelectMany_subquery_with_filter() :
|
|
AssertSql(
|
|
@"SELECT [c].[ContactName], [t].[OrderID]
|
|
FROM (([Customers] AS [c])
|
|
INNER JOIN (
|
|
SELECT [o].*
|
|
FROM ([Orders] AS [o])
|
|
|
|
WHERE [o].[OrderID] > 5
|
|
) AS [t] ON [c].[CustomerID] = [t].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_customers_orders_with_subquery_anonymous_property_method() :
|
|
AssertSql(
|
|
@"SELECT [o20].[OrderID], [o20].[CustomerID], [o20].[EmployeeID], [o20].[OrderDate]
|
|
FROM ([Orders] AS [o20])
|
|
|
|
ORDER BY [o20].[OrderID]",
|
|
//
|
|
@"SELECT [c].[CustomerID]
|
|
FROM ([Customers] AS [c])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_customers_orders_with_subquery_predicate() :
|
|
AssertSql(
|
|
@"SELECT [o20].[CustomerID], [o20].[OrderID]
|
|
FROM ([Orders] AS [o20])
|
|
|
|
WHERE [o20].[OrderID] > 0
|
|
ORDER BY [o20].[OrderID]",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[ContactName]
|
|
FROM ([Customers] AS [c])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_select_many() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM (([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])
|
|
, [Employees] AS [e]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_client_new_expression() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Orders] AS [o])",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM ([Customers] AS [c])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.LastOrDefault() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM ([Customers] AS [c])
|
|
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.IsNullOrEmpty_in_predicate() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM ([Customers] AS [c])
|
|
|
|
WHERE [c].[Region] IS NULL OR ([c].[Region] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupBy_with_orderby_take_skip_distinct() :
|
|
AssertSql(
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM ([Orders] AS [o0])
|
|
|
|
ORDER BY [o0].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Distinct_OrderBy() :
|
|
AssertSql(
|
|
@"SELECT [t].[Country]
|
|
FROM ((
|
|
SELECT DISTINCT [c].[Country]
|
|
FROM ([Customers] AS [c])
|
|
|
|
) AS [t])
|
|
|
|
ORDER BY [t].[Country]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_customers_orders_with_subquery_anonymous_property_method_with_take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT [t].[OrderID], [t].[CustomerID], [t].[EmployeeID], [t].[OrderDate]
|
|
FROM ((
|
|
SELECT TOP @__p_0 [o2].[OrderID], [o2].[CustomerID], [o2].[EmployeeID], [o2].[OrderDate]
|
|
FROM ([Orders] AS [o2])
|
|
|
|
ORDER BY [o2].[OrderID]
|
|
) AS [t])",
|
|
//
|
|
@"SELECT [c].[CustomerID]
|
|
FROM ([Customers] AS [c])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_customers_orders_projection() :
|
|
AssertSql(
|
|
@"SELECT [c].[ContactName], [o].[OrderID]
|
|
FROM (([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_SelectMany_subquery_with_filter_orderby() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM (([Customers] AS [c])
|
|
LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])
|
|
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_tracking_groups() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM (([Customers] AS [c])
|
|
LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])
|
|
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_member_distinct_where() :
|
|
AssertSql(
|
|
@"SELECT [t].[Property]
|
|
FROM ((
|
|
SELECT DISTINCT [c].[CustomerID] AS [Property]
|
|
FROM ([Customers] AS [c])
|
|
|
|
) AS [t])
|
|
|
|
WHERE [t].[Property] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_Where_Count() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])
|
|
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Distinct() :
|
|
AssertSql(
|
|
@"SELECT DISTINCT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM ([Customers] AS [c])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_member_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM ((
|
|
SELECT DISTINCT [c].[CustomerID] AS [Property]
|
|
FROM ([Customers] AS [c])
|
|
|
|
) AS [t])
|
|
|
|
WHERE [t].[Property] LIKE 'A' + '%' AND (LEFT([t].[Property], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_same_collection_force_alias_uniquefication() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM (([Orders] AS [o])
|
|
INNER JOIN [Orders] AS [o0] ON [o].[CustomerID] = [o0].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Local_array() :
|
|
AssertSql(
|
|
@"@__get_Item_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM ([Customers] AS [c])
|
|
|
|
WHERE [c].[CustomerID] = @__get_Item_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_GroupJoin_DefaultIfEmpty_Where() :
|
|
AssertSql(
|
|
@"SELECT [o2].[OrderID], [o2].[CustomerID], [o2].[EmployeeID], [o2].[OrderDate]
|
|
FROM ((([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])
|
|
LEFT JOIN [Orders] AS [o2] ON [c].[CustomerID] = [o2].[CustomerID])
|
|
|
|
WHERE [o2].[OrderID] IS NOT NULL AND ([o2].[CustomerID] = 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Distinct_Take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT TOP @__p_0 [t].[OrderID], [t].[CustomerID], [t].[EmployeeID], [t].[OrderDate]
|
|
FROM ((
|
|
SELECT DISTINCT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Orders] AS [o])
|
|
|
|
) AS [t])
|
|
|
|
ORDER BY [t].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_with_different_outer_elements_with_same_key() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM (([Orders] AS [o])
|
|
LEFT JOIN [Customers] AS [c] ON [o].[CustomerID] = [c].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupBy_simple() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Orders] AS [o])
|
|
|
|
ORDER BY [o].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Entity_equality_self() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM ([Customers] AS [c])
|
|
|
|
WHERE [c].[CustomerID] = [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Lifting_when_subquery_nested_order_by_anonymous() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT [c1_Orders].[OrderID], [c1_Orders].[CustomerID], [c1_Orders].[EmployeeID], [c1_Orders].[OrderDate], [t0].[CustomerID]
|
|
FROM (([Orders] AS [c1_Orders])
|
|
INNER JOIN (
|
|
SELECT DISTINCT [t].[CustomerID]
|
|
FROM ((
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM ([Customers] AS [c])
|
|
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t])
|
|
, [Customers] AS [c2]
|
|
|
|
) AS [t0] ON [c1_Orders].[CustomerID] = [t0].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Distinct_Take_Count() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT COUNT(*)
|
|
FROM ((
|
|
SELECT DISTINCT TOP @__p_0 [o].*
|
|
FROM ([Orders] AS [o])
|
|
|
|
) AS [t])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_simple3() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID]
|
|
FROM (([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Entity_equality_not_null() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM ([Customers] AS [c])
|
|
|
|
WHERE [c].[CustomerID] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Distinct_Count() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM ((
|
|
SELECT DISTINCT [c].*
|
|
FROM ([Customers] AS [c])
|
|
|
|
) AS [t])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_simple_subquery() :
|
|
AssertSql(
|
|
@"@__p_0='4'
|
|
|
|
SELECT [t].[OrderID], [t].[CustomerID], [t].[EmployeeID], [t].[OrderDate]
|
|
FROM (([Customers] AS [c])
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Orders] AS [o])
|
|
|
|
ORDER BY [o].[OrderID]
|
|
) AS [t] ON [c].[CustomerID] = [t].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_DefaultIfEmpty_multiple() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o1].[OrderID], [o1].[CustomerID], [o1].[EmployeeID], [o1].[OrderDate], [o2].[OrderID], [o2].[CustomerID], [o2].[EmployeeID], [o2].[OrderDate]
|
|
FROM ((([Customers] AS [c])
|
|
LEFT JOIN [Orders] AS [o1] ON [c].[CustomerID] = [o1].[CustomerID])
|
|
LEFT JOIN [Orders] AS [o2] ON [c].[CustomerID] = [o2].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_complex_distinct_where() :
|
|
AssertSql(
|
|
@"SELECT [t].[Property]
|
|
FROM ((
|
|
SELECT DISTINCT [c].[CustomerID] + [c].[City] AS [Property]
|
|
FROM ([Customers] AS [c])
|
|
|
|
) AS [t])
|
|
|
|
WHERE [t].[Property] = 'ALFKIBerlin'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_DefaultIfEmpty2() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM (([Employees] AS [e])
|
|
LEFT JOIN [Orders] AS [o] ON [e].[EmployeeID] = [o].[EmployeeID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupBy_nested_order_by_enumerable() :
|
|
AssertSql(
|
|
@"SELECT [c0].[Country], [c0].[CustomerID]
|
|
FROM ([Customers] AS [c0])
|
|
|
|
ORDER BY [c0].[Country]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_member_distinct_orderby() :
|
|
AssertSql(
|
|
@"SELECT [t].[Property]
|
|
FROM ((
|
|
SELECT DISTINCT [c].[CustomerID] AS [Property]
|
|
FROM ([Customers] AS [c])
|
|
|
|
) AS [t])
|
|
|
|
ORDER BY [t].[Property]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_customers_orders_with_subquery_with_take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT [c].[ContactName], [t].[OrderID]
|
|
FROM (([Customers] AS [c])
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [o2].*
|
|
FROM ([Orders] AS [o2])
|
|
|
|
ORDER BY [o2].[OrderID]
|
|
) AS [t] ON [c].[CustomerID] = [t].[CustomerID])
|
|
|
|
WHERE [t].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_SelectMany_subquery_with_filter_and_DefaultIfEmpty() :
|
|
AssertSql(
|
|
@"SELECT [t].[OrderID], [t].[CustomerID], [t].[EmployeeID], [t].[OrderDate], [c].[ContactName]
|
|
FROM (([Customers] AS [c])
|
|
LEFT JOIN (
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Orders] AS [o])
|
|
|
|
WHERE [o].[OrderID] > 5
|
|
) AS [t] ON [c].[CustomerID] = [t].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.IsNullOrEmpty_in_projection() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID] AS [Id], IIf(
|
|
[c].[Region] IS NULL OR ([c].[Region] = ''),
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM ([Customers] AS [c])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_DefaultIfEmpty_Where() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM (([Customers] AS [c])
|
|
LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])
|
|
|
|
WHERE [o].[OrderID] IS NOT NULL AND ([o].[CustomerID] = 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Last() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM ([Customers] AS [c])
|
|
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_same_collection_multiple() :
|
|
AssertSql(
|
|
@"SELECT [c3].[CustomerID], [c3].[Address], [c3].[City], [c3].[CompanyName], [c3].[ContactName], [c3].[ContactTitle], [c3].[Country], [c3].[Fax], [c3].[Phone], [c3].[PostalCode], [c3].[Region]
|
|
FROM ((([Customers] AS [o])
|
|
INNER JOIN [Customers] AS [c2] ON [o].[CustomerID] = [c2].[CustomerID])
|
|
INNER JOIN [Customers] AS [c3] ON [o].[CustomerID] = [c3].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_OrderBy_Count() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Distinct_OrderBy2() :
|
|
AssertSql(
|
|
@"SELECT [t].[CustomerID], [t].[Address], [t].[City], [t].[CompanyName], [t].[ContactName], [t].[ContactTitle], [t].[Country], [t].[Fax], [t].[Phone], [t].[PostalCode], [t].[Region]
|
|
FROM ((
|
|
SELECT DISTINCT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM ([Customers] AS [c])
|
|
|
|
) AS [t])
|
|
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupBy_anonymous() :
|
|
AssertSql(
|
|
@"SELECT [c].[City], [c].[CustomerID]
|
|
FROM ([Customers] AS [c])
|
|
|
|
ORDER BY [c].[City]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Default_if_empty_top_level_arg() :
|
|
AssertSql(
|
|
@"SELECT [c].[EmployeeID], [c].[City], [c].[Country], [c].[FirstName], [c].[ReportsTo], [c].[Title]
|
|
FROM ([Employees] AS [c])
|
|
|
|
WHERE [c].[EmployeeID] = -1");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.IsNullOrWhiteSpace_in_predicate() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM ([Customers] AS [c])
|
|
|
|
WHERE [c].[Region] IS NULL OR (LTRIM(RTRIM([c].[Region])) = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Handle_materialization_properly_when_more_than_two_query_sources_are_involved() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM ([Customers] AS [c])
|
|
, [Orders] AS [o]
|
|
, [Employees] AS [e]
|
|
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Int16_parameter_can_be_used_for_int_column() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Orders] AS [o])
|
|
|
|
WHERE [o].[OrderID] = 10300");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_DefaultIfEmpty3() :
|
|
AssertSql(
|
|
@"@__p_0='1'
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM (((
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM ([Customers] AS [c])
|
|
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t])
|
|
LEFT JOIN [Orders] AS [o] ON [t].[CustomerID] = [o].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_customers_orders_with_subquery_predicate_with_take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT [c].[ContactName], [t].[OrderID]
|
|
FROM (([Customers] AS [c])
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [o2].*
|
|
FROM ([Orders] AS [o2])
|
|
|
|
WHERE [o2].[OrderID] > 0
|
|
ORDER BY [o2].[OrderID]
|
|
) AS [t] ON [c].[CustomerID] = [t].[CustomerID])
|
|
|
|
WHERE [t].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Last_when_no_order_by() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM ([Customers] AS [c])
|
|
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.First_client_predicate() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM ([Customers] AS [c])
|
|
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Count_with_predicate() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM ([Orders] AS [o])
|
|
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_customers_orders_with_subquery() :
|
|
AssertSql(
|
|
@"SELECT [o20].[CustomerID], [o20].[OrderID]
|
|
FROM ([Orders] AS [o20])
|
|
|
|
ORDER BY [o20].[OrderID]",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[ContactName]
|
|
FROM ([Customers] AS [c])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_composite_key() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM (([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON ([c].[CustomerID] = [o].[CustomerID]) AND ([c].[CustomerID] = [o].[CustomerID]))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupBy_anonymous_with_where() :
|
|
AssertSql(
|
|
@"SELECT [c].[City], [c].[CustomerID]
|
|
FROM ([Customers] AS [c])
|
|
|
|
WHERE [c].[Country] IN ('Argentina', 'Austria', 'Brazil', 'France', 'Germany', 'USA')
|
|
ORDER BY [c].[City]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupBy_with_orderby_and_anonymous_projection() :
|
|
AssertSql(
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM ([Orders] AS [o0])
|
|
|
|
ORDER BY [o0].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.IsNullOrEmpty_negated_in_projection() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID] AS [Id], IIf(
|
|
[c].[Region] IS NOT NULL AND ([c].[Region] <> ''),
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM ([Customers] AS [c])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Entity_equality_null() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM ([Customers] AS [c])
|
|
|
|
WHERE [c].[CustomerID] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_simple2() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM (([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_simple() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM (([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_customers_orders_select() :
|
|
AssertSql(
|
|
@"SELECT [c].[ContactName], [o].[OrderID]
|
|
FROM (([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_DefaultIfEmpty_Project() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID]
|
|
FROM (([Customers] AS [c])
|
|
LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_complex_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM ((
|
|
SELECT DISTINCT [c].[CustomerID] + [c].[City] AS [Property]
|
|
FROM ([Customers] AS [c])
|
|
|
|
) AS [t])
|
|
|
|
WHERE [t].[Property] LIKE 'A' + '%' AND (LEFT([t].[Property], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupBy_with_orderby() :
|
|
AssertSql(
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM ([Orders] AS [o0])
|
|
|
|
ORDER BY [o0].[CustomerID], [o0].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Entity_equality_local() :
|
|
AssertSql(
|
|
@"@__local_0_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID]
|
|
FROM ([Customers] AS [c])
|
|
|
|
WHERE [c].[CustomerID] = @__local_0_CustomerID");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_customers_orders_count() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM (([Customers] AS [c])
|
|
LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])
|
|
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Distinct_OrderBy3() :
|
|
AssertSql(
|
|
@"SELECT [t].[CustomerID]
|
|
FROM ((
|
|
SELECT DISTINCT [c].[CustomerID]
|
|
FROM ([Customers] AS [c])
|
|
|
|
) AS [t])
|
|
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_complex_distinct_orderby() :
|
|
AssertSql(
|
|
@"SELECT [t].[Property]
|
|
FROM ((
|
|
SELECT DISTINCT [c].[CustomerID] + [c].[City] AS [Property]
|
|
FROM ([Customers] AS [c])
|
|
|
|
) AS [t])
|
|
|
|
ORDER BY [t].[Property]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_with_different_outer_elements_with_same_key_projected_from_another_entity() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice], [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM ((([Order Details] AS [od])
|
|
INNER JOIN [Orders] AS [od#Order] ON [od].[OrderID] = [od#Order].[OrderID])
|
|
LEFT JOIN [Customers] AS [c] ON [od#Order].[CustomerID] = [c].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DateTime_parse_is_parameterized() :
|
|
AssertSql(
|
|
@"@__Parse_0='01/01/1998 12:00:00' (DbType = DateTime)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Orders] AS [o])
|
|
|
|
WHERE [o].[OrderDate] > @__Parse_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Does_not_change_ordering_of_projection_with_complex_projections() :
|
|
AssertSql(
|
|
@"SELECT [e].[CustomerID] AS [Id], (
|
|
SELECT COUNT(*)
|
|
FROM ([Orders] AS [o0])
|
|
|
|
WHERE [e].[CustomerID] = [o0].[CustomerID]
|
|
) AS [TotalOrders]
|
|
FROM ([Customers] AS [e])
|
|
|
|
WHERE ([e].[ContactTitle] = 'Owner') AND ((
|
|
SELECT COUNT(*)
|
|
FROM ([Orders] AS [o])
|
|
|
|
WHERE [e].[CustomerID] = [o].[CustomerID]
|
|
) > 2)
|
|
ORDER BY [e].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupBy_Count() :
|
|
AssertSql(
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM ([Orders] AS [o0])
|
|
|
|
ORDER BY [o0].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupBy_Distinct() :
|
|
AssertSql(
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM ([Orders] AS [o0])
|
|
|
|
ORDER BY [o0].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_with_different_outer_elements_with_same_key_with_predicate() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM (([Orders] AS [o])
|
|
LEFT JOIN [Customers] AS [c] ON [o].[CustomerID] = [c].[CustomerID])
|
|
|
|
WHERE [o].[OrderID] > 11500");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Distinct_Scalar() :
|
|
AssertSql(
|
|
@"SELECT DISTINCT [c].[City]
|
|
FROM ([Customers] AS [c])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_simple_ordering() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM (([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])
|
|
|
|
ORDER BY [c].[City]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_DefaultIfEmpty() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM (([Customers] AS [c])
|
|
LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Last_Predicate() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM ([Customers] AS [c])
|
|
|
|
WHERE [c].[City] = 'London'
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Entity_equality_local_inline() : line() in C:\Develop\ForPlanning\EntityFrameworkCore.Jet\test\EFCore.Jet.FunctionalTests\QueryJetTest.cs:riga 164
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM ([Customers] AS [c])
|
|
|
|
WHERE [c].[CustomerID] = 'ANATR'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_Where() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM (([Customers] AS [c])
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])
|
|
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.LastOrDefault_Predicate() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM ([Customers] AS [c])
|
|
|
|
WHERE [c].[City] = 'London'
|
|
ORDER BY [c].[ContactName] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Count_with_predicate() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM [Orders] AS [o]
|
|
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Let_any_subquery_anonymous() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT IIf(
|
|
EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o0]
|
|
WHERE [o0].[CustomerID] = @_outer_CustomerID),
|
|
True,
|
|
False
|
|
)
|
|
FROM (SELECT COUNT(*) FROM MSysAccessStorage)",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT IIf(
|
|
EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o0]
|
|
WHERE [o0].[CustomerID] = @_outer_CustomerID),
|
|
True,
|
|
False
|
|
)
|
|
FROM (SELECT COUNT(*) FROM MSysAccessStorage)",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT IIf(
|
|
EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o0]
|
|
WHERE [o0].[CustomerID] = @_outer_CustomerID),
|
|
True,
|
|
False
|
|
)
|
|
FROM (SELECT COUNT(*) FROM MSysAccessStorage)",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT IIf(
|
|
EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o0]
|
|
WHERE [o0].[CustomerID] = @_outer_CustomerID),
|
|
True,
|
|
False
|
|
)
|
|
FROM (SELECT COUNT(*) FROM MSysAccessStorage)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_customers_orders_entities() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Customers] AS [c]INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_Where_OrderBy() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Customers] AS [c]INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])
|
|
|
|
WHERE ([o].[CustomerID] = 'ALFKI') OR ([c].[CustomerID] = 'ANATR')
|
|
ORDER BY [c].[City]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Lifting_when_subquery_nested_order_by_simple() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT [t0].[CustomerID]
|
|
FROM (
|
|
SELECT DISTINCT [t].[CustomerID]
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t], [Customers] AS [c2]
|
|
|
|
) AS [t0]",
|
|
//
|
|
@"SELECT [c1_Orders].[OrderID], [c1_Orders].[CustomerID], [c1_Orders].[EmployeeID], [c1_Orders].[OrderDate]
|
|
FROM [Orders] AS [c1_Orders]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_SelectMany_subquery_with_filter_orderby_and_DefaultIfEmpty() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Customers] AS [c]LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])
|
|
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_SelectMany_subquery_with_filter() :
|
|
AssertSql(
|
|
@"SELECT [c].[ContactName], [t].[OrderID]
|
|
FROM ([Customers] AS [c]INNER JOIN (
|
|
SELECT [o].*
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderID] > 5
|
|
) AS [t] ON [c].[CustomerID] = [t].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_select_many() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM ([Customers] AS [c]INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])
|
|
, [Employees] AS [e]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_customers_orders_projection() :
|
|
AssertSql(
|
|
@"SELECT [c].[ContactName], [o].[OrderID]
|
|
FROM ([Customers] AS [c]INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_SelectMany_subquery_with_filter_orderby() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Customers] AS [c]LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])
|
|
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_tracking_groups() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Customers] AS [c]LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])
|
|
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_Where_Count() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM ([Customers] AS [c]INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])
|
|
|
|
WHERE [c].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_same_collection_force_alias_uniquefication() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM ([Orders] AS [o]INNER JOIN [Orders] AS [o0] ON [o].[CustomerID] = [o0].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Local_array() :
|
|
AssertSql(
|
|
@"@__get_Item_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = @__get_Item_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_GroupJoin_DefaultIfEmpty_Where() :
|
|
AssertSql(
|
|
@"SELECT [o2].[OrderID], [o2].[CustomerID], [o2].[EmployeeID], [o2].[OrderDate]
|
|
FROM (([Customers] AS [c]INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])
|
|
LEFT JOIN [Orders] AS [o2] ON [c].[CustomerID] = [o2].[CustomerID])
|
|
|
|
WHERE [o2].[OrderID] IS NOT NULL AND ([o2].[CustomerID] = 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_with_different_outer_elements_with_same_key() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM ([Orders] AS [o]LEFT JOIN [Customers] AS [c] ON [o].[CustomerID] = [c].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Lifting_when_subquery_nested_order_by_anonymous() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT [c1_Orders].[OrderID], [c1_Orders].[CustomerID], [c1_Orders].[EmployeeID], [c1_Orders].[OrderDate], [t0].[CustomerID]
|
|
FROM ([Orders] AS [c1_Orders]INNER JOIN (
|
|
SELECT DISTINCT [t].[CustomerID]
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t], [Customers] AS [c2]
|
|
|
|
) AS [t0] ON [c1_Orders].[CustomerID] = [t0].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_simple3() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID]
|
|
FROM ([Customers] AS [c]INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_simple_subquery() :
|
|
AssertSql(
|
|
@"@__p_0='4'
|
|
|
|
SELECT [t].[OrderID], [t].[CustomerID], [t].[EmployeeID], [t].[OrderDate]
|
|
FROM ([Customers] AS [c]INNER JOIN (
|
|
SELECT TOP @__p_0 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]
|
|
) AS [t] ON [c].[CustomerID] = [t].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_DefaultIfEmpty_multiple() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o1].[OrderID], [o1].[CustomerID], [o1].[EmployeeID], [o1].[OrderDate], [o2].[OrderID], [o2].[CustomerID], [o2].[EmployeeID], [o2].[OrderDate]
|
|
FROM (([Customers] AS [c]LEFT JOIN [Orders] AS [o1] ON [c].[CustomerID] = [o1].[CustomerID])
|
|
LEFT JOIN [Orders] AS [o2] ON [c].[CustomerID] = [o2].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_DefaultIfEmpty2() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Employees] AS [e]LEFT JOIN [Orders] AS [o] ON [e].[EmployeeID] = [o].[EmployeeID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_customers_orders_with_subquery_with_take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT [c].[ContactName], [t].[OrderID]
|
|
FROM ([Customers] AS [c]INNER JOIN (
|
|
SELECT TOP @__p_0 [o2].*
|
|
FROM [Orders] AS [o2]
|
|
ORDER BY [o2].[OrderID]
|
|
) AS [t] ON [c].[CustomerID] = [t].[CustomerID])
|
|
|
|
WHERE [t].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_SelectMany_subquery_with_filter_and_DefaultIfEmpty() :
|
|
AssertSql(
|
|
@"SELECT [t].[OrderID], [t].[CustomerID], [t].[EmployeeID], [t].[OrderDate], [c].[ContactName]
|
|
FROM ([Customers] AS [c]LEFT JOIN (
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderID] > 5
|
|
) AS [t] ON [c].[CustomerID] = [t].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.IsNullOrEmpty_in_projection() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID] AS [Id], IIf(
|
|
[c].[Region] IS NULL OR ([c].[Region] = ''),
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_DefaultIfEmpty_Where() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Customers] AS [c]LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])
|
|
|
|
WHERE [o].[OrderID] IS NOT NULL AND ([o].[CustomerID] = 'ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_same_collection_multiple() :
|
|
AssertSql(
|
|
@"SELECT [c3].[CustomerID], [c3].[Address], [c3].[City], [c3].[CompanyName], [c3].[ContactName], [c3].[ContactTitle], [c3].[Country], [c3].[Fax], [c3].[Phone], [c3].[PostalCode], [c3].[Region]
|
|
FROM (([Customers] AS [o]INNER JOIN [Customers] AS [c2] ON [o].[CustomerID] = [c2].[CustomerID])
|
|
INNER JOIN [Customers] AS [c3] ON [o].[CustomerID] = [c3].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_OrderBy_Count() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM ([Customers] AS [c]INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Handle_materialization_properly_when_more_than_two_query_sources_are_involved() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c], [Orders] AS [o]
|
|
, [Employees] AS [e]
|
|
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_DefaultIfEmpty3() :
|
|
AssertSql(
|
|
@"@__p_0='1'
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ((
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t]LEFT JOIN [Orders] AS [o] ON [t].[CustomerID] = [o].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_customers_orders_with_subquery_predicate_with_take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT [c].[ContactName], [t].[OrderID]
|
|
FROM ([Customers] AS [c]INNER JOIN (
|
|
SELECT TOP @__p_0 [o2].*
|
|
FROM [Orders] AS [o2]
|
|
WHERE [o2].[OrderID] > 0
|
|
ORDER BY [o2].[OrderID]
|
|
) AS [t] ON [c].[CustomerID] = [t].[CustomerID])
|
|
|
|
WHERE [t].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_composite_key() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Customers] AS [c]INNER JOIN [Orders] AS [o] ON ([c].[CustomerID] = [o].[CustomerID]) AND ([c].[CustomerID] = [o].[CustomerID]))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.IsNullOrEmpty_negated_in_projection() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID] AS [Id], IIf(
|
|
[c].[Region] IS NOT NULL AND ([c].[Region] <> ''),
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_simple2() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM ([Customers] AS [c]INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_simple() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Customers] AS [c]INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Join_customers_orders_select() :
|
|
AssertSql(
|
|
@"SELECT [c].[ContactName], [o].[OrderID]
|
|
FROM ([Customers] AS [c]INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_DefaultIfEmpty_Project() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID]
|
|
FROM ([Customers] AS [c]LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_customers_orders_count() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Customers] AS [c]LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])
|
|
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_with_different_outer_elements_with_same_key_projected_from_another_entity() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice], [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM (([Order Details] AS [od]INNER JOIN [Orders] AS [od#Order] ON [od].[OrderID] = [od#Order].[OrderID])
|
|
LEFT JOIN [Customers] AS [c] ON [od#Order].[CustomerID] = [c].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_with_different_outer_elements_with_same_key_with_predicate() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM ([Orders] AS [o]LEFT JOIN [Customers] AS [c] ON [o].[CustomerID] = [c].[CustomerID])
|
|
|
|
WHERE [o].[OrderID] > 11500");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_simple_ordering() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Customers] AS [c]INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])
|
|
|
|
ORDER BY [c].[City]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_DefaultIfEmpty() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Customers] AS [c]LEFT JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupJoin_Where() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Customers] AS [c]INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])
|
|
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.IsNullOrEmpty_in_projection() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID] AS [Id], IIf(
|
|
[c].[Region] IS NULL OR ([c].[Region] = ''),
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Handle_materialization_properly_when_more_than_two_query_sources_are_involved() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c], [Orders] AS [o]
|
|
, [Employees] AS [e]
|
|
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.IsNullOrEmpty_negated_in_projection() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID] AS [Id], IIf(
|
|
[c].[Region] IS NOT NULL AND ([c].[Region] <> ''),
|
|
True,
|
|
False
|
|
) AS [Value]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Handle_materialization_properly_when_more_than_two_query_sources_are_involved() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c], [Orders] AS [o]
|
|
, [Employees] AS [e]
|
|
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Handle_materialization_properly_when_more_than_two_query_sources_are_involved() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
, [Orders] AS [o]
|
|
, [Employees] AS [e]
|
|
|
|
ORDER BY [c].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_null_coalesce_operator() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(IsNull([c].[Region]), 'ZZ', [c].[Region])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_DTO_with_member_init_distinct_in_subquery_used_in_projection_translated_to_server() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [t].[Id], [t].[Count]
|
|
FROM [Customers] AS [c]
|
|
, (
|
|
SELECT DISTINCT [o].[CustomerID] AS [Id], [o].[OrderID] AS [Count]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderID] < 10300
|
|
) AS [t]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Projection_null_coalesce_operator() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[CompanyName], IIf(IsNull([c].[Region]), 'ZZ', [c].[Region]) AS [Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Null_conditional_deep() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE CInt(IIf(IsNull(LEN([c].[CustomerID])),0,LEN([c].[CustomerID]))) = 5");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Local_array() :
|
|
AssertSql(
|
|
@"@__get_Item_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = @__get_Item_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Max_with_coalesce() :
|
|
AssertSql(
|
|
@"SELECT MAX(IIf(IsNull([p].[UnitPrice]), 0.0, [p].[UnitPrice]))
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[ProductID] < 40");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_skip_take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
@__p_1='8'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactTitle], [c].[ContactName]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.SelectMany_cartesian_product_with_ordering() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[City] AS [City0]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE ([c].[City] = [e].[City]) OR ([c].[City] IS NULL AND [e].[City] IS NULL)
|
|
ORDER BY [e].[City], [c].[CustomerID] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_coalesce_take_distinct() :
|
|
AssertSql(
|
|
@"@__p_0='15'
|
|
|
|
SELECT DISTINCT [t].*
|
|
FROM (
|
|
SELECT TOP @__p_0 [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
ORDER BY IIf(IsNull([p].[UnitPrice]), 0.0, [p].[UnitPrice])
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Min_with_coalesce() :
|
|
AssertSql(
|
|
@"SELECT MIN(IIf(IsNull([p].[UnitPrice]), 0.0, [p].[UnitPrice]))
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[ProductID] < 40");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Query_expression_with_to_string_and_contains() :
|
|
AssertSql(
|
|
@"SELECT [o].[CustomerID]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL AND (Instr(Str([o].[EmployeeID]), '10') > 0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Null_conditional_deep() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE CInt(IIf(IsNull(LEN([c].[CustomerID])),0,LEN([c].[CustomerID]))) = 5");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_take_long_count() :
|
|
AssertSql(
|
|
@"@__p_0='7'
|
|
|
|
SELECT COUNT(*)
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM [Customers] AS [c]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_int_to_string() :
|
|
AssertSql(
|
|
@"SELECT Str([o].[OrderID]) AS [ShipName]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_DTO_with_member_init_distinct_in_subquery_used_in_projection_translated_to_server() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [t].[Id], [t].[Count]
|
|
FROM [Customers] AS [c]
|
|
, (
|
|
SELECT DISTINCT [o].[CustomerID] AS [Id], [o].[OrderID] AS [Count]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderID] < 10300
|
|
) AS [t]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_math_round_int() :
|
|
AssertSql(
|
|
@"SELECT ROUND(CDbl(IIf(IsNull([o].[OrderID]),0,[o].[OrderID])), 0) AS [A]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderID] < 10250");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_long_to_string() :
|
|
AssertSql(
|
|
@"SELECT Str([o].[OrderID]) AS [ShipName]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_other_to_string() :
|
|
AssertSql(
|
|
@"SELECT Str([o].[OrderDate]) AS [ShipName]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_distinct_long_count() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].*
|
|
FROM [Customers] AS [c]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_skip_take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
@__p_1='8'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactTitle], [c].[ContactName]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.SelectMany_cartesian_product_with_ordering() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[City] AS [City0]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE ([c].[City] = [e].[City]) OR ([c].[City] IS NULL AND [e].[City] IS NULL)
|
|
ORDER BY [e].[City], [c].[CustomerID] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_multi_level6() :
|
|
AssertSql(
|
|
@"SELECT (
|
|
SELECT TOP 1 (
|
|
SELECT TOP 1 [od].[ProductID]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] <> CInt(IIf(IsNull(LEN([c].[CustomerID])),0,LEN([c].[CustomerID])))) AND ([o].[OrderID] = [od].[OrderID])
|
|
)
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND ([c].[CustomerID] = [o].[CustomerID])
|
|
) AS [Order]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_multi_level() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 3 [o].[OrderDate] AS [Date]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND (@_outer_CustomerID = [o].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 3 [o].[OrderDate] AS [Date]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND (@_outer_CustomerID = [o].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 3 [o].[OrderDate] AS [Date]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND (@_outer_CustomerID = [o].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 3 [o].[OrderDate] AS [Date]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND (@_outer_CustomerID = [o].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_correlated_subquery_projection() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[CustomerID]
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
ORDER BY [t].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = @_outer_CustomerID",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = @_outer_CustomerID",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = @_outer_CustomerID");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_take_average() :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT AVG(CDbl(IIf(IsNull([t].[OrderID]),0,[t].[OrderID])))
|
|
FROM (
|
|
SELECT TOP @__p_0 [o].[OrderID]
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Skip_Take() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
@__p_1='10'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Query_expression_with_to_string_and_contains() :
|
|
AssertSql(
|
|
@"SELECT [o].[CustomerID]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL AND (Instr(Str([o].[EmployeeID]), '10') > 0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_distinct_average() :
|
|
AssertSql(
|
|
@"SELECT AVG(CDbl(IIf(IsNull([t].[OrderID]),0,[t].[OrderID])))
|
|
FROM (
|
|
SELECT DISTINCT [o].[OrderID]
|
|
FROM [Orders] AS [o]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_anonymous_constant_in_expression() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], CInt(IIf(IsNull(LEN([c].[CustomerID])),0,LEN([c].[CustomerID]))) + 5 AS [Expression]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_Where_Subquery_Deep_Single() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE [od].[OrderID] = 10344",
|
|
//
|
|
@"@_outer_OrderID='10344'
|
|
|
|
SELECT TOP 2 [o0].[CustomerID]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_OrderID = [o0].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID1='WHITC' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 2 [c2].[City]
|
|
FROM [Customers] AS [c2]
|
|
WHERE @_outer_CustomerID1 = [c2].[CustomerID]",
|
|
//
|
|
@"@_outer_OrderID='10344'
|
|
|
|
SELECT TOP 2 [o0].[CustomerID]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_OrderID = [o0].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID1='WHITC' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 2 [c2].[City]
|
|
FROM [Customers] AS [c2]
|
|
WHERE @_outer_CustomerID1 = [c2].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_orderBy_take_long_count() :
|
|
AssertSql(
|
|
@"@__p_0='7'
|
|
|
|
SELECT COUNT(*)
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[Country]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_multi_level2() :
|
|
AssertSql(
|
|
@"SELECT (
|
|
SELECT TOP 1 [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND ([c].[CustomerID] = [o].[CustomerID])
|
|
) AS [OrderDates]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Query_expression_with_to_string_and_contains() :
|
|
AssertSql(
|
|
@"SELECT [o].[CustomerID]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL AND (Instr(Str([o].[EmployeeID]), '10') > 0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_int_to_string() :
|
|
AssertSql(
|
|
@"SELECT Str([o].[OrderID]) AS [ShipName]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_math_round_int() :
|
|
AssertSql(
|
|
@"SELECT ROUND(CDbl(IIf(IsNull([o].[OrderID]),0,[o].[OrderID])), 0) AS [A]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderID] < 10250");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_long_to_string() :
|
|
AssertSql(
|
|
@"SELECT Str([o].[OrderID]) AS [ShipName]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_other_to_string() :
|
|
AssertSql(
|
|
@"SELECT Str([o].[OrderDate]) AS [ShipName]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_distinct_long_count() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].*
|
|
FROM [Customers] AS [c]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_multi_level6() :
|
|
AssertSql(
|
|
@"SELECT (
|
|
SELECT TOP 1 (
|
|
SELECT TOP 1 [od].[ProductID]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] <> CInt(IIf(IsNull(LEN([c].[CustomerID])),0,LEN([c].[CustomerID])))) AND ([o].[OrderID] = [od].[OrderID])
|
|
)
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND ([c].[CustomerID] = [o].[CustomerID])
|
|
) AS [Order]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_correlated_subquery_projection() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[CustomerID]
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
ORDER BY [t].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = @_outer_CustomerID",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = @_outer_CustomerID",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = @_outer_CustomerID");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_distinct_average() :
|
|
AssertSql(
|
|
@"SELECT AVG(CDbl(IIf(IsNull([t].[OrderID]),0,[t].[OrderID])))
|
|
FROM (
|
|
SELECT DISTINCT [o].[OrderID]
|
|
FROM [Orders] AS [o]
|
|
) AS [t]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_multi_level2() :
|
|
AssertSql(
|
|
@"SELECT (
|
|
SELECT TOP 1 [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND ([c].[CustomerID] = [o].[CustomerID])
|
|
) AS [OrderDates]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_int_to_string() :
|
|
AssertSql(
|
|
@"SELECT Str([o].[OrderID]) AS [ShipName]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_long_to_string() :
|
|
AssertSql(
|
|
@"SELECT Str([o].[OrderID]) AS [ShipName]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_other_to_string() :
|
|
AssertSql(
|
|
@"SELECT Str([o].[OrderDate]) AS [ShipName]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_nested_collection_multi_level2() :
|
|
AssertSql(
|
|
@"SELECT (
|
|
SELECT TOP 1 [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10500) AND ([c].[CustomerID] = [o].[CustomerID])
|
|
) AS [OrderDates]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_int_to_string() :
|
|
AssertSql(
|
|
@"SELECT Str([o].[OrderID]) AS [ShipName]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_long_to_string() :
|
|
AssertSql(
|
|
@"SELECT Str([o].[OrderID]) AS [ShipName]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_other_to_string() :
|
|
AssertSql(
|
|
@"SELECT Str([o].[OrderDate]) AS [ShipName]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_EndsWith_Literal() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE RIGHT([c].[ContactName], LEN('b')) = 'b'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_EndsWith_Column() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (RIGHT([c].[ContactName], LEN([c].[ContactName])) = [c].[ContactName]) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_EndsWith_Identity() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (RIGHT([c].[ContactName], LEN([c].[ContactName])) = [c].[ContactName]) OR ([c].[ContactName] = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_EndsWith_MethodCall() :
|
|
AssertSql(
|
|
@"@__LocalMethod2_0='m' (Nullable = false) (Size = 1)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (RIGHT([c].[ContactName], LEN(@__LocalMethod2_0)) = @__LocalMethod2_0) OR (@__LocalMethod2_0 = '')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_compare_with_parameter() :
|
|
AssertSql(
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] > @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] < @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] >= @__customer_CustomerID_0",
|
|
//
|
|
@"@__customer_CustomerID_0='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] >= @__customer_CustomerID_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_in_complex_predicate() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE (([p].[ProductID] > 100) AND ([p].[Discontinued] = True)) OR ([p].[Discontinued] = True)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_negated_twice() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_parameter() :
|
|
AssertSql(
|
|
@"@__prm_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE @__prm_0 = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_client_side_negated() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_equals_constant() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_false() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = False");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_shadow() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_false_shadow() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = False");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_bool_member_false() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE [p].[Discontinued] = False");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_complex_negated_expression_optimized() :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE (([p].[Discontinued] = False) AND ([p].[ProductID] < 60)) AND ([p].[ProductID] > 30)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_method_call_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__GetCity_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__GetCity_0",
|
|
//
|
|
@"@__GetCity_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__GetCity_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_is_null() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]",
|
|
//
|
|
@"@_outer_ReportsTo='2'
|
|
|
|
SELECT TOP 2 [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = @_outer_ReportsTo",
|
|
//
|
|
@"SELECT TOP 2 [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] IS NULL",
|
|
//
|
|
@"@_outer_ReportsTo='2'
|
|
|
|
SELECT TOP 2 [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = @_outer_ReportsTo");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_closure() :
|
|
AssertSql(
|
|
@"@__city_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_static_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__StaticFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__StaticFieldValue_0",
|
|
//
|
|
@"@__StaticFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__StaticFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_closure_constant() :
|
|
AssertSql(
|
|
@"@__predicate_0='True'
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE @__predicate_0 = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_one_element_SingleOrDefault() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]",
|
|
//
|
|
@"@_outer_ReportsTo='2'
|
|
|
|
SELECT TOP 2 [e20].[EmployeeID]
|
|
FROM [Employees] AS [e20]
|
|
WHERE [e20].[EmployeeID] = @_outer_ReportsTo",
|
|
//
|
|
@"SELECT TOP 2 [e20].[EmployeeID]
|
|
FROM [Employees] AS [e20]
|
|
WHERE [e20].[EmployeeID] IS NULL",
|
|
//
|
|
@"@_outer_ReportsTo='2'
|
|
|
|
SELECT TOP 2 [e20].[EmployeeID]
|
|
FROM [Employees] AS [e20]
|
|
WHERE [e20].[EmployeeID] = @_outer_ReportsTo");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_shadow_subquery_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[Title] = (
|
|
SELECT TOP 1 [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
ORDER BY [e2].[Title]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_false() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_using_int_overload_on_mismatched_types() :
|
|
AssertSql(
|
|
@"@__shortPrm_0='1'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[EmployeeID] = @__shortPrm_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_0",
|
|
//
|
|
@"@__city_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition2_FirstOrDefault() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]
|
|
WHERE [t].[FirstName] = (
|
|
SELECT TOP 1 [e0].[FirstName]
|
|
FROM [Employees] AS [e0]
|
|
ORDER BY [e0].[EmployeeID]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_on_mismatched_types_nullable_int_long() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True",
|
|
//
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_false() :
|
|
AssertSql(
|
|
@"@__flag_0='False'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ((@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)) OR ((@__flag_0 <> True) AND ([p].[UnitsInStock] < 20))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_sin() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (SIN([od].[Discount]) > 0E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_select_many_or_with_parameter() :
|
|
AssertSql(
|
|
@"@__lisboa_1='Lisboa' (Nullable = false) (Size = 6)
|
|
@__london_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE [c].[City] IN (@__london_0, 'Berlin', 'Seattle', @__lisboa_1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_is_not_null() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]",
|
|
//
|
|
@"@_outer_ReportsTo='2'
|
|
|
|
SELECT TOP 2 [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = @_outer_ReportsTo",
|
|
//
|
|
@"SELECT TOP 2 [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] IS NULL",
|
|
//
|
|
@"@_outer_ReportsTo='2'
|
|
|
|
SELECT TOP 2 [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = @_outer_ReportsTo");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_true() :
|
|
AssertSql(
|
|
@"@__flag_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ((@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)) OR ((@__flag_0 <> True) AND ([p].[UnitsInStock] < 20))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_closure_via_query_cache_nullable_type() :
|
|
AssertSql(
|
|
@"@__reportsTo_0='2'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__reportsTo_0",
|
|
//
|
|
@"@__reportsTo_0='5'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__reportsTo_0",
|
|
//
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_nested_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_Nested_InstanceFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstanceFieldValue_0",
|
|
//
|
|
@"@__city_Nested_InstanceFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstanceFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_method_call_nullable_type_reverse_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_NullableInt_0='1'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[EmployeeID] > @__city_NullableInt_0",
|
|
//
|
|
@"@__city_NullableInt_0='5'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[EmployeeID] > @__city_NullableInt_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_exp() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (EXP([od].[Discount]) > 1E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title]
|
|
FROM [Employees] AS [e1]
|
|
WHERE [e1].[FirstName] = (
|
|
SELECT TOP 1 [e].[FirstName]
|
|
FROM [Employees] AS [e]
|
|
ORDER BY [e].[EmployeeID]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_static_property_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__StaticPropertyValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__StaticPropertyValue_0",
|
|
//
|
|
@"@__StaticPropertyValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__StaticPropertyValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_no_elements_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title]
|
|
FROM [Employees] AS [e1]
|
|
WHERE (
|
|
SELECT TOP 1 [e2].[EmployeeID]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = 42
|
|
) = 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_string_length() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE CInt(IIf(IsNull(LEN([c].[City])),0,LEN([c].[City]))) = 6");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_cos() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (COS([od].[Discount]) > 0E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_simple_closure_via_query_cache_nullable_type_reverse() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] IS NULL",
|
|
//
|
|
@"@__reportsTo_0='5'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__reportsTo_0",
|
|
//
|
|
@"@__reportsTo_0='2'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__reportsTo_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_property_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_InstancePropertyValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstancePropertyValue_0",
|
|
//
|
|
@"@__city_InstancePropertyValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstancePropertyValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_null_is_not_null() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_nested_property_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_Nested_InstancePropertyValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstancePropertyValue_0",
|
|
//
|
|
@"@__city_Nested_InstancePropertyValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstancePropertyValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_InstanceFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstanceFieldValue_0",
|
|
//
|
|
@"@__city_InstanceFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstanceFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_on_matched_nullable_int_types() :
|
|
AssertSql(
|
|
@"@__nullableIntPrm_0='2'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE @__nullableIntPrm_0 = [e].[ReportsTo]",
|
|
//
|
|
@"@__nullableIntPrm_0='2'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__nullableIntPrm_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_with_false_as_result_false() :
|
|
AssertSql(
|
|
@"@__flag_0='False'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE (@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_new_instance_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__InstanceFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__InstanceFieldValue_0",
|
|
//
|
|
@"@__InstanceFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__InstanceFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_multiple_elements_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title]
|
|
FROM [Employees] AS [e1]
|
|
WHERE (
|
|
SELECT TOP 1 [e2].[EmployeeID]
|
|
FROM [Employees] AS [e2]
|
|
WHERE ([e2].[EmployeeID] <> [e1].[ReportsTo]) OR [e1].[ReportsTo] IS NULL
|
|
) = 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_using_object_overload_on_mismatched_types() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_on_mismatched_types_nullable_long_nullable_int() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True",
|
|
//
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_one_element_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title]
|
|
FROM [Employees] AS [e1]
|
|
WHERE (
|
|
SELECT TOP 1 [e2].[EmployeeID]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = [e1].[ReportsTo]
|
|
) = 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_tan() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (TAN([od].[Discount]) > 0E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_false() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_using_int_overload_on_mismatched_types() :
|
|
AssertSql(
|
|
@"@__shortPrm_0='1'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[EmployeeID] = @__shortPrm_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_InstanceFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstanceFieldValue_0",
|
|
//
|
|
@"@__city_InstanceFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstanceFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_on_matched_nullable_int_types() :
|
|
AssertSql(
|
|
@"@__nullableIntPrm_0='2'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE @__nullableIntPrm_0 = [e].[ReportsTo]",
|
|
//
|
|
@"@__nullableIntPrm_0='2'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__nullableIntPrm_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_method_call_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__GetCity_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__GetCity_0",
|
|
//
|
|
@"@__GetCity_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__GetCity_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_false() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_using_int_overload_on_mismatched_types() :
|
|
AssertSql(
|
|
@"@__shortPrm_0='1'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[EmployeeID] = @__shortPrm_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_sin() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (SIN([od].[Discount]) > 0E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_nested_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_Nested_InstanceFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstanceFieldValue_0",
|
|
//
|
|
@"@__city_Nested_InstanceFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstanceFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_method_call_nullable_type_reverse_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_NullableInt_0='1'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[EmployeeID] > @__city_NullableInt_0",
|
|
//
|
|
@"@__city_NullableInt_0='5'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[EmployeeID] > @__city_NullableInt_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_exp() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (EXP([od].[Discount]) > 1E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_cos() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (COS([od].[Discount]) > 0E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_nested_property_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_Nested_InstancePropertyValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstancePropertyValue_0",
|
|
//
|
|
@"@__city_Nested_InstancePropertyValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstancePropertyValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_InstanceFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstanceFieldValue_0",
|
|
//
|
|
@"@__city_InstanceFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstanceFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_on_matched_nullable_int_types() :
|
|
AssertSql(
|
|
@"@__nullableIntPrm_0='2'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE @__nullableIntPrm_0 = [e].[ReportsTo]",
|
|
//
|
|
@"@__nullableIntPrm_0='2'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__nullableIntPrm_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_new_instance_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__InstanceFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__InstanceFieldValue_0",
|
|
//
|
|
@"@__InstanceFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__InstanceFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_tan() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (TAN([od].[Discount]) > 0E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_on_matched_nullable_int_types() :
|
|
AssertSql(
|
|
@"@__nullableIntPrm_0='2'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE @__nullableIntPrm_0 = [e].[ReportsTo]",
|
|
//
|
|
@"@__nullableIntPrm_0='2'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[ReportsTo] = @__nullableIntPrm_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_InstanceFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstanceFieldValue_0",
|
|
//
|
|
@"@__city_InstanceFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstanceFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_DateTime_Date() :
|
|
AssertSql(
|
|
@"SELECT [e].[OrderID], [e].[CustomerID], [e].[EmployeeID], [e].[OrderDate]
|
|
FROM [Orders] AS [e]
|
|
WHERE IIf(IsNull([e].[OrderDate]), NULL, DateValue([e].[OrderDate])) IN (#07/04/1996 00:00:00#, #07/16/1996 00:00:00#)",
|
|
//
|
|
@"SELECT [e].[OrderID], [e].[CustomerID], [e].[EmployeeID], [e].[OrderDate]
|
|
FROM [Orders] AS [e]
|
|
WHERE IIf(IsNull([e].[OrderDate]), NULL, DateValue([e].[OrderDate])) IN (#07/04/1996 00:00:00#)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Anonymous_complex_orderby() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID] + [c].[City] AS [A]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID] + [c].[City]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_complex_orderby() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID] + [c].[City] AS [Property]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID] + [c].[City]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_client_Take() :
|
|
AssertSql(
|
|
@"@__p_1='10'
|
|
|
|
SELECT TOP @__p_1 [o].[EmployeeID], [o].[City], [o].[Country], [o].[FirstName], [o].[ReportsTo], [o].[Title]
|
|
FROM [Employees] AS [o]
|
|
ORDER BY 'a'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupBy_DateTimeOffset_Property() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL
|
|
ORDER BY DatePart(""m"", [o].[OrderDate])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.GroupBy_DateTimeOffset_Property() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL
|
|
ORDER BY DatePart(""m"", [o].[OrderDate])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.OrderBy_integer() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY 'a'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Parameter_extraction_short_circuits_3() :
|
|
AssertSql(
|
|
@"@__dateFilter_Value_Year_1='1996'
|
|
@__dateFilter_Value_Month_0='7'
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10400) OR (([o].[OrderDate] IS NOT NULL AND (DatePart('m', [o].[OrderDate]) = @__dateFilter_Value_Month_0)) AND (DatePart('yyyy', [o].[OrderDate]) = @__dateFilter_Value_Year_1))",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Parameter_extraction_short_circuits_3() :
|
|
AssertSql(
|
|
@"@__dateFilter_Value_Year_1='1996'
|
|
@__dateFilter_Value_Month_0='7'
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10400) OR (([o].[OrderDate] IS NOT NULL AND (DatePart('m', [o].[OrderDate]) = @__dateFilter_Value_Month_0)) AND (DatePart('yyyy', [o].[OrderDate]) = @__dateFilter_Value_Year_1))",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Parameter_extraction_short_circuits_2() :
|
|
AssertSql(
|
|
@"@__dateFilter_Value_Month_0='7'
|
|
@__dateFilter_Value_Year_1='1996'
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[OrderID] < 10400) AND (([o].[OrderDate] IS NOT NULL AND (DatePart('m', [o].[OrderDate]) = @__dateFilter_Value_Month_0)) AND (DatePart('yyyy', [o].[OrderDate]) = @__dateFilter_Value_Year_1))",
|
|
//
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE False = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Query_expression_with_to_string_and_contains() :
|
|
AssertSql(
|
|
@"SELECT [o].[CustomerID]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL AND (Instr(Str([o].[EmployeeID]), '10') > 0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_chain() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE ([o].[CustomerID] = 'QUICK') AND ([o].[OrderDate] > #01/01/1998 00:00:00#)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_using_int_overload_on_mismatched_types() :
|
|
AssertSql(
|
|
@"@__shortPrm_0='1'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[EmployeeID] = @__shortPrm_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Skip_Take() :
|
|
AssertSql(
|
|
@"@__p_1='10'
|
|
@__p_0='5'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_InstanceFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstanceFieldValue_0",
|
|
//
|
|
@"@__city_InstanceFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstanceFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Select_expression_date_add_year() :
|
|
AssertSql(
|
|
@"SELECT DateAdd('yyyy', 1, [o].[OrderDate]) AS [OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Skip() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Skip_Take() :
|
|
AssertSql(
|
|
@"@__p_1='10'
|
|
@__p_0='5'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Skip_no_orderby() :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY 'a'
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Skip_Take() :
|
|
AssertSql(
|
|
@"@__p_1='10'
|
|
@__p_0='5'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Skip_Take() :
|
|
AssertSql(
|
|
@"@__p_1='10'
|
|
@__p_0='5'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Skip_Take() :
|
|
AssertSql(
|
|
@"@__p_1='10'
|
|
@__p_0='5'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Compare_nested() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'M' + [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <> UCase([c].[CustomerID])",
|
|
//
|
|
@"@__ToUpper_0='ALF' (Nullable = false) (Size = 3)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] > Replace('ALFKI', @__ToUpper_0, [c].[CustomerID])",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= 'M' + [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] > UCase([c].[CustomerID])",
|
|
//
|
|
@"@__ToUpper_0='ALF' (Nullable = false) (Size = 3)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] < Replace('ALFKI', @__ToUpper_0, [c].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_datetime_utcnow() :
|
|
AssertSql(
|
|
@"@__myDatetime_0='04/10/2015 00:00:00' (DbType = DateTime)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE Now() <> @__myDatetime_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_datetime_now() :
|
|
AssertSql(
|
|
@"@__myDatetime_0='04/10/2015 00:00:00' (DbType = DateTime)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE Now() <> @__myDatetime_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_datetime_utcnow() :
|
|
AssertSql(
|
|
@"@__myDatetime_0='04/10/2015 00:00:00' (DbType = DateTime)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE Now() <> @__myDatetime_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_functions_nested() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_functions_nested() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE CInt(IIf(IsNull(Len([c].[CustomerID])),0,Len([c].[CustomerID])))^2E0 = 25E0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_equals_using_int_overload_on_mismatched_types() :
|
|
AssertSql(
|
|
@"@__shortPrm_0='1'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[EmployeeID] = @__shortPrm_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_guid_newguid() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE NewGuid() <> '00000000-0000-0000-0000-000000000000'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_power() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE [od].[Discount]^2E0 > 0.05000000074505806E0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_sin() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (SIN([od].[Discount]) > 0E0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_sign() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (Sgn([od].[Discount]) > 0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_log() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE (([od].[OrderID] = 11077) AND ([od].[Discount] > 0)) AND (LOG([od].[Discount]) < 0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_log() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE (([od].[OrderID] = 11077) AND ([od].[Discount] > 0)) AND (LOG([od].[Discount]) < 0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_asin() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (Atn([od].[Discount] / Sqr(-[od].[Discount] * [od].[Discount] + 1)) > 0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_acos() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND ((1.5707963267948966 + Atn(-[od].[Discount] / Sqr(-[od].[Discount] * [od].[Discount] + 1))) > 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_atan() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (Atn([od].[Discount]) > 0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_method_call_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__GetCity_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__GetCity_0",
|
|
//
|
|
@"@__GetCity_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__GetCity_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_sqrt() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE ([od].[OrderID] = 11077) AND (Sqr([od].[Discount]) > 0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_nested_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_Nested_InstanceFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstanceFieldValue_0",
|
|
//
|
|
@"@__city_Nested_InstanceFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstanceFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_method_call_nullable_type_reverse_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_NullableInt_0='1'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[EmployeeID] > @__city_NullableInt_0",
|
|
//
|
|
@"@__city_NullableInt_0='5'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[EmployeeID] > @__city_NullableInt_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_nested_property_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_Nested_InstancePropertyValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstancePropertyValue_0",
|
|
//
|
|
@"@__city_Nested_InstancePropertyValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_Nested_InstancePropertyValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_new_instance_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__InstanceFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__InstanceFieldValue_0",
|
|
//
|
|
@"@__InstanceFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__InstanceFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_log10() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE (([od].[OrderID] = 11077) AND ([od].[Discount] > 0)) AND ((Log([od].[Discount]) / 2.3025850929940459) < 0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_log_new_base() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE (([od].[OrderID] = 11077) AND ([od].[Discount] > 0)) AND ((Log([od].[Discount]) / Log(7)) < 0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_math_truncate() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM [Order Details] AS [od]
|
|
WHERE Int([od].[UnitPrice]) > 10.0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_method_call_nullable_type_reverse_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_NullableInt_0='1'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[EmployeeID] > @__city_NullableInt_0",
|
|
//
|
|
@"@__city_NullableInt_0='5'
|
|
|
|
SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[EmployeeID] > @__city_NullableInt_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition2_FirstOrDefault() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]
|
|
WHERE [t].[FirstName] = (
|
|
SELECT TOP 1 [e0].[FirstName]
|
|
FROM [Employees] AS [e0]
|
|
ORDER BY [e0].[EmployeeID]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_is_null() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]",
|
|
//
|
|
@"@_outer_ReportsTo='2'
|
|
|
|
SELECT TOP 2 [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = @_outer_ReportsTo",
|
|
//
|
|
@"SELECT TOP 2 [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] IS NULL",
|
|
//
|
|
@"@_outer_ReportsTo='2'
|
|
|
|
SELECT TOP 2 [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = @_outer_ReportsTo");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_one_element_SingleOrDefault() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]",
|
|
//
|
|
@"@_outer_ReportsTo='2'
|
|
|
|
SELECT TOP 2 [e20].[EmployeeID]
|
|
FROM [Employees] AS [e20]
|
|
WHERE [e20].[EmployeeID] = @_outer_ReportsTo",
|
|
//
|
|
@"SELECT TOP 2 [e20].[EmployeeID]
|
|
FROM [Employees] AS [e20]
|
|
WHERE [e20].[EmployeeID] IS NULL",
|
|
//
|
|
@"@_outer_ReportsTo='2'
|
|
|
|
SELECT TOP 2 [e20].[EmployeeID]
|
|
FROM [Employees] AS [e20]
|
|
WHERE [e20].[EmployeeID] = @_outer_ReportsTo");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_is_not_null() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]",
|
|
//
|
|
@"@_outer_ReportsTo='2'
|
|
|
|
SELECT TOP 2 [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = @_outer_ReportsTo",
|
|
//
|
|
@"SELECT TOP 2 [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] IS NULL",
|
|
//
|
|
@"@_outer_ReportsTo='2'
|
|
|
|
SELECT TOP 2 [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = @_outer_ReportsTo");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_no_elements_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title]
|
|
FROM [Employees] AS [e1]
|
|
WHERE (
|
|
SELECT TOP 1 [e2].[EmployeeID]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = 42
|
|
) = 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_property_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__city_InstancePropertyValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstancePropertyValue_0",
|
|
//
|
|
@"@__city_InstancePropertyValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__city_InstancePropertyValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_multiple_elements_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title]
|
|
FROM [Employees] AS [e1]
|
|
WHERE (
|
|
SELECT TOP 1 [e2].[EmployeeID]
|
|
FROM [Employees] AS [e2]
|
|
WHERE ([e2].[EmployeeID] <> [e1].[ReportsTo]) OR [e1].[ReportsTo] IS NULL
|
|
) = 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_entity_equality_one_element_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title]
|
|
FROM [Employees] AS [e1]
|
|
WHERE (
|
|
SELECT TOP 1 [e2].[EmployeeID]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = [e1].[ReportsTo]
|
|
) = 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_query_composition_is_null() :
|
|
AssertSql(
|
|
@"@__p_0='3'
|
|
|
|
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title]
|
|
FROM (
|
|
SELECT TOP @__p_0 [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
) AS [t]",
|
|
//
|
|
@"@_outer_ReportsTo='2'
|
|
|
|
SELECT TOP 2 [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = @_outer_ReportsTo",
|
|
//
|
|
@"SELECT TOP 2 [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] IS NULL",
|
|
//
|
|
@"@_outer_ReportsTo='2'
|
|
|
|
SELECT TOP 2 [e2].[EmployeeID], [e2].[City], [e2].[Country], [e2].[FirstName], [e2].[ReportsTo], [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
WHERE [e2].[EmployeeID] = @_outer_ReportsTo");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_shadow_subquery_FirstOrDefault() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Employees] AS [e]
|
|
WHERE [e].[Title] = (
|
|
SELECT TOP 1 [e2].[Title]
|
|
FROM [Employees] AS [e2]
|
|
ORDER BY [e2].[Title]
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_select_many_or_with_parameter() :
|
|
AssertSql(
|
|
@"@__london_0='London' (Nullable = false) (Size = 6)
|
|
@__lisboa_1='Lisboa' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region], [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM [Customers] AS [c]
|
|
, [Employees] AS [e]
|
|
WHERE [c].[City] IN (@__london_0, 'Berlin', 'Seattle', @__lisboa_1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_static_field_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__StaticFieldValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__StaticFieldValue_0",
|
|
//
|
|
@"@__StaticFieldValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__StaticFieldValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_false() :
|
|
AssertSql(
|
|
@"@__flag_0='False'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ((@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)) OR ((@__flag_0 <> True) AND ([p].[UnitsInStock] < 20))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_true() :
|
|
AssertSql(
|
|
@"@__flag_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ((@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)) OR ((@__flag_0 <> True) AND ([p].[UnitsInStock] < 20))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_static_property_access_closure_via_query_cache() :
|
|
AssertSql(
|
|
@"@__StaticPropertyValue_0='London' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__StaticPropertyValue_0",
|
|
//
|
|
@"@__StaticPropertyValue_0='Seattle' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[City] = @__StaticPropertyValue_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_string_length() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE CInt(IIf(IsNull(Len([c].[City])),0,Len([c].[City]))) = 6");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_with_another_condition() :
|
|
AssertSql(
|
|
@"@__productId_0='15'
|
|
@__flag_1='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ([p].[ProductID] < @__productId_0) AND (((@__flag_1 = True) AND ([p].[UnitsInStock] >= 20)) OR ((@__flag_1 <> True) AND ([p].[UnitsInStock] < 20)))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_with_false_as_result_false() :
|
|
AssertSql(
|
|
@"@__flag_0='False'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE (@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_with_false_as_result_true() :
|
|
AssertSql(
|
|
@"@__flag_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE (@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_false() :
|
|
AssertSql(
|
|
@"@__flag_0='False'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ((@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)) OR ((@__flag_0 <> True) AND ([p].[UnitsInStock] < 20))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_true() :
|
|
AssertSql(
|
|
@"@__flag_0='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ((@__flag_0 = True) AND ([p].[UnitsInStock] >= 20)) OR ((@__flag_0 <> True) AND ([p].[UnitsInStock] < 20))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Where_ternary_boolean_condition_with_another_condition() :
|
|
AssertSql(
|
|
@"@__productId_0='15'
|
|
@__flag_1='True'
|
|
|
|
SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
WHERE ([p].[ProductID] < @__productId_0) AND (((@__flag_1 = True) AND ([p].[UnitsInStock] >= 20)) OR ((@__flag_1 <> True) AND ([p].[UnitsInStock] < 20)))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested_negated3() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE NOT EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A')) AND (([c].[City] <> 'London') OR [c].[City] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested_negated2() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (([c].[City] <> 'London') OR [c].[City] IS NULL) AND NOT EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Anonymous_complex_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] + [c].[City] AS [A]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[A] LIKE 'A' + '%' AND (LEFT([t].[A], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_member_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] AS [Property]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[Property] LIKE 'A' + '%' AND (LEFT([t].[Property], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested3() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A')) AND (([c].[City] <> 'London') OR [c].[City] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Anonymous_member_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[CustomerID] LIKE 'A' + '%' AND (LEFT([t].[CustomerID], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Contains_with_local_collection_empty_closure() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE 0 = 1");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested_negated() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE NOT EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Any_nested2() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE (([c].[City] <> 'London') OR [c].[City] IS NULL) AND EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] LIKE 'A' + '%' AND (LEFT([o].[CustomerID], LEN('A')) = 'A'))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.DTO_complex_distinct_result() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM (
|
|
SELECT DISTINCT [c].[CustomerID] + [c].[City] AS [Property]
|
|
FROM [Customers] AS [c]
|
|
) AS [t]
|
|
WHERE [t].[Property] LIKE 'A' + '%' AND (LEFT([t].[Property], LEN('A')) = 'A')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.String_Compare_nested() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'M' + [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <> UCase([c].[CustomerID])",
|
|
//
|
|
@"@__ToUpper_0='ALF' (Nullable = false) (Size = 3)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] > Replace('ALFKI', @__ToUpper_0, [c].[CustomerID])",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] <= 'M' + [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] > UCase([c].[CustomerID])",
|
|
//
|
|
@"@__ToUpper_0='ALF' (Nullable = false) (Size = 3)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] < Replace('ALFKI', @__ToUpper_0, [c].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Query_expression_with_to_string_and_contains() :
|
|
AssertSql(
|
|
@"SELECT [o].[CustomerID]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL AND (Instr(1, Str([o].[EmployeeID]), '10', 0) > 0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_bitwise_and_enum() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND 1) > 0)",
|
|
//
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND 1) = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_bitwise_and_enum() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND 1) > 0)",
|
|
//
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND 1) = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Null_propagation_optimization5() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (CInt(IIf(IsNull(Len([g].[LeaderNickname])),0,Len([g].[LeaderNickname]))) = 5)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Client_method_on_collection_navigation_in_additional_from_clause() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname] AS [g], [g].[SquadId]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] = 'Officer'",
|
|
//
|
|
@"@_outer_Nickname='Baird' (Nullable = false) (Size = 5)
|
|
@_outer_SquadId='1'
|
|
|
|
SELECT [g0].[Nickname], [g0].[SquadId], [g0].[AssignedCityName], [g0].[CityOrBirthName], [g0].[Discriminator], [g0].[FullName], [g0].[HasSoulPatch], [g0].[LeaderNickname], [g0].[LeaderSquadId], [g0].[Rank]
|
|
FROM [Gear] AS [g0]
|
|
WHERE [g0].[Discriminator] IN ('Officer', 'Gear') AND ((@_outer_Nickname = [g0].[LeaderNickname]) AND (@_outer_SquadId = [g0].[LeaderSquadId]))",
|
|
//
|
|
@"@_outer_Nickname='Marcus' (Nullable = false) (Size = 6)
|
|
@_outer_SquadId='1'
|
|
|
|
SELECT [g0].[Nickname], [g0].[SquadId], [g0].[AssignedCityName], [g0].[CityOrBirthName], [g0].[Discriminator], [g0].[FullName], [g0].[HasSoulPatch], [g0].[LeaderNickname], [g0].[LeaderSquadId], [g0].[Rank]
|
|
FROM [Gear] AS [g0]
|
|
WHERE [g0].[Discriminator] IN ('Officer', 'Gear') AND ((@_outer_Nickname = [g0].[LeaderNickname]) AND (@_outer_SquadId = [g0].[LeaderSquadId]))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_predicate_negated_complex2() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE IIf(
|
|
([t0].[HasSoulPatch] <> True) AND [t0].[HasSoulPatch] IS NOT NULL,
|
|
False,
|
|
[t0].[HasSoulPatch]
|
|
) <> True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_and_order_by_are_properly_lifted_from_subquery_created_by_tracking() :
|
|
AssertSql(
|
|
@"SELECT [g].[FullName]
|
|
FROM [Gear] AS [g]
|
|
WHERE ([g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[FullName] <> 'Augustus Cole')) AND ([g].[HasSoulPatch] = False)
|
|
ORDER BY [g].[FullName], [g].[Rank]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Count_with_optional_navigation_is_translated_to_sql() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM ([Gear] AS [g]
|
|
LEFT JOIN [CogTag] AS [g#Tag] ON ([g].[Nickname] = [g#Tag].[GearNickName]) AND ([g].[SquadId] = [g#Tag].[GearSquadId]))
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g#Tag].[Note] <> 'Foo') OR [g#Tag].[Note] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Client_method_on_collection_navigation_in_predicate_accessed_by_ef_property() :
|
|
AssertSql(
|
|
@"SELECT [g].[FullName], [g].[Nickname]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[HasSoulPatch] = False)",
|
|
//
|
|
@"@_outer_FullName='Augustus Cole' (Nullable = false) (Size = 13)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE @_outer_FullName = [w].[OwnerFullName]",
|
|
//
|
|
@"@_outer_FullName='Dominic Santiago' (Nullable = false) (Size = 16)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE @_outer_FullName = [w].[OwnerFullName]",
|
|
//
|
|
@"@_outer_FullName='Garron Paduk' (Nullable = false) (Size = 12)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE @_outer_FullName = [w].[OwnerFullName]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_nested_ternary_operations() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
[w].[IsAutomatic] = False,
|
|
IIf(
|
|
[w].[AmmunitionType] = 1,
|
|
'ManualCartridge',
|
|
'Manual'
|
|
),
|
|
'Auto'
|
|
) AS [IsManualCartidge]
|
|
FROM [Weapon] AS [w]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Subquery_containing_SelectMany_projecting_main_from_clause_gets_lifted() :
|
|
AssertSql(
|
|
@"SELECT [gear].[FullName]
|
|
FROM [Gear] AS [gear]
|
|
, [CogTag] AS [tag]
|
|
WHERE [gear].[Discriminator] IN ('Officer', 'Gear') AND ([gear].[HasSoulPatch] = True)
|
|
ORDER BY [gear].[FullName], [tag].[Note]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Null_propagation_optimization2() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (RIGHT([g].[LeaderNickname], Len('us')) = 'us')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_Where_Navigation() :
|
|
AssertSql(
|
|
@"SELECT [ct].[Id], [ct].[GearNickName], [ct].[GearSquadId], [ct].[Note]
|
|
FROM ([CogTag] AS [ct]
|
|
LEFT JOIN (
|
|
SELECT [ct#Gear].*
|
|
FROM [Gear] AS [ct#Gear]
|
|
WHERE [ct#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t] ON ([ct].[GearNickName] = [t].[Nickname]) AND ([ct].[GearSquadId] = [t].[SquadId]))
|
|
WHERE [t].[Nickname] = 'Marcus'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.FirstOrDefault_with_manually_created_groupjoin_is_translated_to_sql() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [s].[Id], [s].[InternalNumber], [s].[Name]
|
|
FROM ([Squad] AS [s]
|
|
LEFT JOIN (
|
|
SELECT [g].*
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t] ON [s].[Id] = [t].[SquadId])
|
|
WHERE [s].[Name] = 'Kilo'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_list_initializers() :
|
|
AssertSql(
|
|
@"SELECT [t0].[SquadId], [t0].[SquadId] + 1
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Order_by_is_properly_lifted_from_subquery_with_same_order_by_in_the_outer_query() :
|
|
AssertSql(
|
|
@"SELECT [g].[FullName]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[HasSoulPatch] = False)
|
|
ORDER BY [g].[FullName]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_predicate2() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE [t0].[HasSoulPatch] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.All_with_optional_navigation_is_translated_to_sql() :
|
|
AssertSql(
|
|
@"SELECT IIf(
|
|
NOT EXISTS (
|
|
SELECT 1
|
|
FROM ([Gear] AS [g]
|
|
LEFT JOIN [CogTag] AS [g#Tag] ON ([g].[Nickname] = [g#Tag].[GearNickName]) AND ([g].[SquadId] = [g#Tag].[GearSquadId]))
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ([g#Tag].[Note] = 'Foo')),
|
|
True,
|
|
False
|
|
)
|
|
FROM (SELECT COUNT(*) FROM MSysAccessStorage)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Client_method_on_collection_navigation_in_predicate() :
|
|
AssertSql(
|
|
@"SELECT [g].[FullName], [g].[Nickname]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[HasSoulPatch] = True)",
|
|
//
|
|
@"@_outer_FullName='Damon Baird' (Nullable = false) (Size = 11)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE @_outer_FullName = [w].[OwnerFullName]",
|
|
//
|
|
@"@_outer_FullName='Marcus Fenix' (Nullable = false) (Size = 12)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE @_outer_FullName = [w].[OwnerFullName]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_predicate_negated() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t0].[HasSoulPatch] <> True) AND [t0].[HasSoulPatch] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_bitwise_and_nullable_enum_with_constant() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE ([w].[AmmunitionType] BAND 1) > 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_enum_has_flag_with_non_nullable_parameter() :
|
|
AssertSql(
|
|
@"@__parameter_0='Corporal'
|
|
|
|
SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND @__parameter_0) = @__parameter_0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_DTOs() :
|
|
AssertSql(
|
|
@"SELECT [t0].[SquadId] AS [Id]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_ternary_operation_with_has_value_not_null() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
[w].[AmmunitionType] IS NOT NULL AND ([w].[AmmunitionType] = 1),
|
|
'Yes',
|
|
'No'
|
|
) AS [IsCartidge]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[AmmunitionType] IS NOT NULL AND ([w].[AmmunitionType] = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_orderby() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL
|
|
ORDER BY [t0].[SquadId]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_ternary_operation_with_boolean() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
[w].[IsAutomatic] = True,
|
|
1,
|
|
0
|
|
) AS [Num]
|
|
FROM [Weapon] AS [w]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_inverted_boolean() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
[w].[IsAutomatic] = False,
|
|
True,
|
|
False
|
|
) AS [Manual]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[IsAutomatic] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Client_method_on_collection_navigation_in_outer_join_key() :
|
|
AssertSql(
|
|
@"SELECT [g].[FullName], [g].[Nickname]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear')",
|
|
//
|
|
@"@_outer_FullName1='Damon Baird' (Nullable = false) (Size = 11)
|
|
|
|
SELECT [w0].[Id], [w0].[AmmunitionType], [w0].[IsAutomatic], [w0].[Name], [w0].[OwnerFullName], [w0].[SynergyWithId]
|
|
FROM [Weapon] AS [w0]
|
|
WHERE @_outer_FullName1 = [w0].[OwnerFullName]",
|
|
//
|
|
@"@_outer_FullName1='Augustus Cole' (Nullable = false) (Size = 13)
|
|
|
|
SELECT [w0].[Id], [w0].[AmmunitionType], [w0].[IsAutomatic], [w0].[Name], [w0].[OwnerFullName], [w0].[SynergyWithId]
|
|
FROM [Weapon] AS [w0]
|
|
WHERE @_outer_FullName1 = [w0].[OwnerFullName]",
|
|
//
|
|
@"@_outer_FullName1='Dominic Santiago' (Nullable = false) (Size = 16)
|
|
|
|
SELECT [w0].[Id], [w0].[AmmunitionType], [w0].[IsAutomatic], [w0].[Name], [w0].[OwnerFullName], [w0].[SynergyWithId]
|
|
FROM [Weapon] AS [w0]
|
|
WHERE @_outer_FullName1 = [w0].[OwnerFullName]",
|
|
//
|
|
@"@_outer_FullName1='Marcus Fenix' (Nullable = false) (Size = 12)
|
|
|
|
SELECT [w0].[Id], [w0].[AmmunitionType], [w0].[IsAutomatic], [w0].[Name], [w0].[OwnerFullName], [w0].[SynergyWithId]
|
|
FROM [Weapon] AS [w0]
|
|
WHERE @_outer_FullName1 = [w0].[OwnerFullName]",
|
|
//
|
|
@"@_outer_FullName1='Garron Paduk' (Nullable = false) (Size = 12)
|
|
|
|
SELECT [w0].[Id], [w0].[AmmunitionType], [w0].[IsAutomatic], [w0].[Name], [w0].[OwnerFullName], [w0].[SynergyWithId]
|
|
FROM [Weapon] AS [w0]
|
|
WHERE @_outer_FullName1 = [w0].[OwnerFullName]",
|
|
//
|
|
@"SELECT [o].[FullName], [o].[Nickname] AS [o]
|
|
FROM [Gear] AS [o]
|
|
WHERE ([o].[Discriminator] = 'Officer') AND ([o].[HasSoulPatch] = True)",
|
|
//
|
|
@"@_outer_FullName='Damon Baird' (Nullable = false) (Size = 11)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE @_outer_FullName = [w].[OwnerFullName]",
|
|
//
|
|
@"@_outer_FullName='Marcus Fenix' (Nullable = false) (Size = 12)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE @_outer_FullName = [w].[OwnerFullName]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_projection() :
|
|
AssertSql(
|
|
@"SELECT [t0].[SquadId]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_groupby() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note], [t0].[SquadId]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL
|
|
ORDER BY [t0].[SquadId]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_multiple_conditions() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
([w].[IsAutomatic] = False) AND ([w].[SynergyWithId] = 1),
|
|
True,
|
|
False
|
|
) AS [IsCartidge]
|
|
FROM [Weapon] AS [w]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Null_propagation_optimization3() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (RIGHT([g].[LeaderNickname], Len('us')) = 'us')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_correlated_filtered_collection_with_composite_key() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] = 'Officer'",
|
|
//
|
|
@"@_outer_Nickname='Baird' (Nullable = false) (Size = 5)
|
|
@_outer_SquadId='1'
|
|
|
|
SELECT [r].[Nickname], [r].[SquadId], [r].[AssignedCityName], [r].[CityOrBirthName], [r].[Discriminator], [r].[FullName], [r].[HasSoulPatch], [r].[LeaderNickname], [r].[LeaderSquadId], [r].[Rank]
|
|
FROM [Gear] AS [r]
|
|
WHERE ([r].[Discriminator] IN ('Officer', 'Gear') AND ([r].[Nickname] <> 'Dom')) AND ((@_outer_Nickname = [r].[LeaderNickname]) AND (@_outer_SquadId = [r].[LeaderSquadId]))",
|
|
//
|
|
@"@_outer_Nickname='Marcus' (Nullable = false) (Size = 6)
|
|
@_outer_SquadId='1'
|
|
|
|
SELECT [r].[Nickname], [r].[SquadId], [r].[AssignedCityName], [r].[CityOrBirthName], [r].[Discriminator], [r].[FullName], [r].[HasSoulPatch], [r].[LeaderNickname], [r].[LeaderSquadId], [r].[Rank]
|
|
FROM [Gear] AS [r]
|
|
WHERE ([r].[Discriminator] IN ('Officer', 'Gear') AND ([r].[Nickname] <> 'Dom')) AND ((@_outer_Nickname = [r].[LeaderNickname]) AND (@_outer_SquadId = [r].[LeaderSquadId]))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Subquery_created_by_include_gets_lifted_nested() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank], [g#CityOfBirth].[Name], [g#CityOfBirth].[Location]
|
|
FROM ([Gear] AS [g]
|
|
INNER JOIN [City] AS [g#CityOfBirth] ON [g].[CityOrBirthName] = [g#CityOfBirth].[Name])
|
|
WHERE ([g].[Discriminator] IN ('Officer', 'Gear') AND EXISTS (
|
|
SELECT 1
|
|
FROM [Weapon] AS [w]
|
|
WHERE [g].[FullName] = [w].[OwnerFullName])) AND ([g].[HasSoulPatch] = False)
|
|
ORDER BY [g].[Nickname], [g].[Rank]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_binary_expression() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t0].[HasSoulPatch] = True) OR (Instr(1, [t].[Note], 'Cole', 0) > 0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Any_with_optional_navigation_as_subquery_predicate_is_translated_to_sql() :
|
|
AssertSql(
|
|
@"SELECT [s].[Name]
|
|
FROM [Squad] AS [s]
|
|
WHERE NOT EXISTS (
|
|
SELECT 1
|
|
FROM ([Gear] AS [m]
|
|
LEFT JOIN [CogTag] AS [m#Tag] ON ([m].[Nickname] = [m#Tag].[GearNickName]) AND ([m].[SquadId] = [m#Tag].[GearSquadId]))
|
|
WHERE ([m].[Discriminator] IN ('Officer', 'Gear') AND ([m#Tag].[Note] = 'Dom''s Tag')) AND ([s].[Id] = [m].[SquadId]))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_has_flag_with_nullable_parameter() :
|
|
AssertSql(
|
|
@"@__parameter_0='Corporal'
|
|
|
|
SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND @__parameter_0) = @__parameter_0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Singleton_Navigation_With_Member_Access() :
|
|
AssertSql(
|
|
@"SELECT [t].[CityOrBirthName] AS [B]
|
|
FROM ([CogTag] AS [ct]
|
|
LEFT JOIN (
|
|
SELECT [ct#Gear].*
|
|
FROM [Gear] AS [ct#Gear]
|
|
WHERE [ct#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t] ON ([ct].[GearNickName] = [t].[Nickname]) AND ([ct].[GearSquadId] = [t].[SquadId]))
|
|
WHERE ([t].[Nickname] = 'Marcus') AND (([t].[CityOrBirthName] <> 'Ephyra') OR [t].[CityOrBirthName] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_enum_has_flag() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND 1) = 1)",
|
|
//
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND 5) = 5)",
|
|
//
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND 1) = 1)",
|
|
//
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND 1) = 1)",
|
|
//
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ((1 BAND [g].[Rank]) = [g].[Rank])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Navigation_access_via_EFProperty_on_derived_entity_using_cast() :
|
|
AssertSql(
|
|
@"SELECT [f].[Name], [t].[ThreatLevel] AS [Threat]
|
|
FROM ([Faction] AS [f]
|
|
LEFT JOIN (
|
|
SELECT [f#Commander].*
|
|
FROM [LocustLeader] AS [f#Commander]
|
|
WHERE [f#Commander].[Discriminator] = 'LocustCommander'
|
|
) AS [t] ON [f].[CommanderName] = [t].[Name])
|
|
WHERE ([f].[Discriminator] = 'LocustHorde') AND ([f].[Discriminator] = 'LocustHorde')
|
|
ORDER BY [f].[Name]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_null_propagation_negative2() :
|
|
AssertSql(
|
|
@"SELECT IIf(
|
|
[g1].[LeaderNickname] IS NOT NULL,
|
|
[g2].[LeaderNickname],
|
|
NULL
|
|
)
|
|
FROM [Gear] AS [g1]
|
|
, [Gear] AS [g2]
|
|
WHERE [g1].[Discriminator] IN ('Officer', 'Gear')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Coalesce_operator_in_predicate_with_other_conditions() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE ([w].[AmmunitionType] = 1) AND (IIf(IsNull([w].[IsAutomatic]), False, [w].[IsAutomatic]) = True)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_nullable_enum_with_nullable_parameter() :
|
|
AssertSql(
|
|
@"@__ammunitionType_0='Cartridge'
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[AmmunitionType] = @__ammunitionType_0",
|
|
//
|
|
@"SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[AmmunitionType] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Order_by_then_by_is_properly_lifted_from_subquery_created_by_include() :
|
|
AssertSql(
|
|
@"SELECT [g].[FullName]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[HasSoulPatch] = False)
|
|
ORDER BY [g].[FullName], [g].[Rank], [g].[Nickname] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Distinct_with_optional_navigation_is_translated_to_sql() :
|
|
AssertSql(
|
|
@"SELECT DISTINCT [g].[HasSoulPatch]
|
|
FROM ([Gear] AS [g]
|
|
LEFT JOIN [CogTag] AS [g#Tag] ON ([g].[Nickname] = [g#Tag].[GearNickName]) AND ([g].[SquadId] = [g#Tag].[GearSquadId]))
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g#Tag].[Note] <> 'Foo') OR [g#Tag].[Note] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_bitwise_and_nullable_enum_with_null_constant() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE ([w].[AmmunitionType] BAND NULL) > 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Unnecessary_include_doesnt_get_added_complex_when_projecting_EF_Property() :
|
|
AssertSql(
|
|
@"SELECT [g].[FullName]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[HasSoulPatch] = True)
|
|
ORDER BY [g].[Rank]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Order_by_is_properly_lifted_from_subquery_created_by_include() :
|
|
AssertSql(
|
|
@"SELECT [g].[FullName]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[HasSoulPatch] = False)
|
|
ORDER BY [g].[FullName], [g].[Rank]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Subquery_containing_join_projecting_main_from_clause_gets_lifted() :
|
|
AssertSql(
|
|
@"SELECT [gear].[Nickname]
|
|
FROM ([Gear] AS [gear]
|
|
INNER JOIN [CogTag] AS [tag] ON [gear].[Nickname] = [tag].[GearNickName])
|
|
WHERE [gear].[Discriminator] IN ('Officer', 'Gear')
|
|
ORDER BY [gear].[Nickname], [tag].[Note]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_take() :
|
|
AssertSql(
|
|
@"SELECT [t0].[SquadId]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Navigation_access_on_derived_materialized_entity_using_cast() :
|
|
AssertSql(
|
|
@"SELECT [f].[Id], [f].[CapitalName], [f].[Discriminator], [f].[Name], [f].[CommanderName], [f].[Eradicated], [t].[ThreatLevel]
|
|
FROM ([Faction] AS [f]
|
|
LEFT JOIN (
|
|
SELECT [f#Commander].*
|
|
FROM [LocustLeader] AS [f#Commander]
|
|
WHERE [f#Commander].[Discriminator] = 'LocustCommander'
|
|
) AS [t] ON [f].[CommanderName] = [t].[Name])
|
|
WHERE ([f].[Discriminator] = 'LocustHorde') AND ([f].[Discriminator] = 'LocustHorde')
|
|
ORDER BY [f].[Name]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_Navigation_Null_Coalesce_To_Clr_Type() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 CBool(IIf(IsNull(IIf(IsNull([w#SynergyWith].[IsAutomatic]), False, [w#SynergyWith].[IsAutomatic])),0,IIf(IsNull([w#SynergyWith].[IsAutomatic]), False, [w#SynergyWith].[IsAutomatic]))) AS [IsAutomatic]
|
|
FROM ([Weapon] AS [w]
|
|
LEFT JOIN [Weapon] AS [w#SynergyWith] ON [w].[SynergyWithId] = [w#SynergyWith].[Id])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Non_unicode_parameter_is_used_for_non_unicode_column() :
|
|
AssertSql(
|
|
@"@__value_0='Unknown' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[Name], [c].[Location]
|
|
FROM [City] AS [c]
|
|
WHERE [c].[Location] = @__value_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_all() :
|
|
AssertSql(
|
|
@"SELECT IIf(
|
|
NOT EXISTS (
|
|
SELECT 1
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE (([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL) AND ([t0].[HasSoulPatch] = False)),
|
|
True,
|
|
False
|
|
)
|
|
FROM (SELECT COUNT(*) FROM MSysAccessStorage)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_bitwise_and_integral() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND 1) = 1)",
|
|
//
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND 1) = 1)",
|
|
//
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND 1) = 1)",
|
|
//
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND 1) = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Subquery_containing_join_gets_lifted_clashing_names() :
|
|
AssertSql(
|
|
@"SELECT [gear].[Nickname]
|
|
FROM (([Gear] AS [gear]
|
|
INNER JOIN [CogTag] AS [tag] ON [gear].[Nickname] = [tag].[GearNickName])
|
|
INNER JOIN [CogTag] AS [tag0] ON [gear].[Nickname] = [tag0].[GearNickName])
|
|
WHERE [gear].[Discriminator] IN ('Officer', 'Gear') AND (([tag].[GearNickName] <> 'Cole Train') OR [tag].[GearNickName] IS NULL)
|
|
ORDER BY [gear].[Nickname], [tag0].[Id], [tag].[Note]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Subquery_is_not_lifted_from_additional_from_clause() :
|
|
AssertSql(
|
|
@"SELECT [g1].[FullName] AS [Name1]
|
|
FROM [Gear] AS [g1]
|
|
WHERE [g1].[Discriminator] IN ('Officer', 'Gear') AND ([g1].[HasSoulPatch] = True)
|
|
ORDER BY [g1].[FullName]",
|
|
//
|
|
@"SELECT [g0].[HasSoulPatch], [g0].[FullName]
|
|
FROM [Gear] AS [g0]
|
|
WHERE [g0].[Discriminator] IN ('Officer', 'Gear')
|
|
ORDER BY [g0].[Rank]",
|
|
//
|
|
@"SELECT [g0].[HasSoulPatch], [g0].[FullName]
|
|
FROM [Gear] AS [g0]
|
|
WHERE [g0].[Discriminator] IN ('Officer', 'Gear')
|
|
ORDER BY [g0].[Rank]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_is_properly_lifted_from_subquery_created_by_include() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank], [g#Tag].[Id], [g#Tag].[GearNickName], [g#Tag].[GearSquadId], [g#Tag].[Note]
|
|
FROM ([Gear] AS [g]
|
|
LEFT JOIN [CogTag] AS [g#Tag] ON ([g].[Nickname] = [g#Tag].[GearNickName]) AND ([g].[SquadId] = [g#Tag].[GearSquadId]))
|
|
WHERE ([g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[FullName] <> 'Augustus Cole')) AND ([g].[HasSoulPatch] = False)
|
|
ORDER BY [g].[FullName]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_comparison_with_null() :
|
|
AssertSql(
|
|
@"@__ammunitionType_1='Cartridge'
|
|
@__ammunitionType_0='Cartridge'
|
|
|
|
SELECT [w].[Id], IIf(
|
|
[w].[AmmunitionType] = @__ammunitionType_1,
|
|
True,
|
|
False
|
|
) AS [Cartidge]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[AmmunitionType] = @__ammunitionType_0",
|
|
//
|
|
@"SELECT [w].[Id], IIf(
|
|
[w].[AmmunitionType] IS NULL,
|
|
True,
|
|
False
|
|
) AS [Cartidge]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[AmmunitionType] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_ternary_operation_with_inverted_boolean() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
[w].[IsAutomatic] = False,
|
|
1,
|
|
0
|
|
) AS [Num]
|
|
FROM [Weapon] AS [w]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_length_of_string_property() :
|
|
AssertSql(
|
|
@"SELECT [w].[Name], CInt(IIf(IsNull(Len([w].[Name])),0,Len([w].[Name]))) AS [Length]
|
|
FROM [Weapon] AS [w]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_enum_has_flag() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 IIf(
|
|
([g].[Rank] BAND 1) = 1,
|
|
True,
|
|
False
|
|
) AS [hasFlagTrue], IIf(
|
|
([g].[Rank] BAND 2) = 2,
|
|
True,
|
|
False
|
|
) AS [hasFlagFalse]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND 1) = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Subquery_containing_left_join_projecting_main_from_clause_gets_lifted() :
|
|
AssertSql(
|
|
@"SELECT [gear].[Nickname]
|
|
FROM ([Gear] AS [gear]
|
|
LEFT JOIN [CogTag] AS [tag] ON [gear].[Nickname] = [tag].[GearNickName])
|
|
WHERE [gear].[Discriminator] IN ('Officer', 'Gear')
|
|
ORDER BY [gear].[Nickname], [gear].[Rank]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_skip() :
|
|
AssertSql(
|
|
@"SELECT [t0].[SquadId]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Client_method_on_collection_navigation_in_order_by() :
|
|
AssertSql(
|
|
@"SELECT [g].[FullName], [g].[Nickname]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[HasSoulPatch] = False)",
|
|
//
|
|
@"@_outer_FullName='Augustus Cole' (Nullable = false) (Size = 13)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE @_outer_FullName = [w].[OwnerFullName]",
|
|
//
|
|
@"@_outer_FullName='Dominic Santiago' (Nullable = false) (Size = 16)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE @_outer_FullName = [w].[OwnerFullName]",
|
|
//
|
|
@"@_outer_FullName='Garron Paduk' (Nullable = false) (Size = 12)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE @_outer_FullName = [w].[OwnerFullName]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_ternary_operation_multiple_conditions_2() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
([w].[IsAutomatic] = False) AND ([w].[SynergyWithId] = 1),
|
|
'Yes',
|
|
'No'
|
|
) AS [IsCartidge]
|
|
FROM [Weapon] AS [w]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Complex_predicate_with_AndAlso_and_nullable_bool_property() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM ([Weapon] AS [w]
|
|
LEFT JOIN (
|
|
SELECT [w#Owner].*
|
|
FROM [Gear] AS [w#Owner]
|
|
WHERE [w#Owner].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t] ON [w].[OwnerFullName] = [t].[FullName])
|
|
WHERE ([w].[Id] <> 50) AND ([t].[HasSoulPatch] = False)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Coalesce_operator_in_predicate() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE IIf(IsNull([w].[IsAutomatic]), False, [w].[IsAutomatic]) = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Subquery_is_lifted_from_main_from_clause_of_SelectMany() :
|
|
AssertSql(
|
|
@"SELECT [g].[FullName] AS [Name1], [g2].[FullName] AS [Name2]
|
|
FROM [Gear] AS [g]
|
|
, [Gear] AS [g2]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[HasSoulPatch] = True) AND ([g2].[HasSoulPatch] = False))
|
|
ORDER BY [g].[FullName], [g].[Rank]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Multiple_order_bys_are_properly_lifted_from_subquery_created_by_include() :
|
|
AssertSql(
|
|
@"SELECT [g].[FullName]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[HasSoulPatch] = False)
|
|
ORDER BY [g].[FullName], [g].[Nickname] DESC, [g].[Rank]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_contains() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE (([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL) AND [t0].[SquadId] IN (
|
|
SELECT [g].[SquadId]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear')
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_bitwise_and_nullable_enum_with_non_nullable_parameter() :
|
|
AssertSql(
|
|
@"@__ammunitionType_0='Cartridge'
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE ([w].[AmmunitionType] BAND @__ammunitionType_0) > 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_bitwise_and_nullable_enum_with_nullable_parameter() :
|
|
AssertSql(
|
|
@"@__ammunitionType_0='Cartridge'
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE ([w].[AmmunitionType] BAND @__ammunitionType_0) > 0",
|
|
//
|
|
@"@__ammunitionType_0='' (Nullable = false) (DbType = String)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE ([w].[AmmunitionType] BAND @__ammunitionType_0) > 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_predicate_negated_complex1() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE IIf(
|
|
[t0].[HasSoulPatch] = True,
|
|
True,
|
|
[t0].[HasSoulPatch]
|
|
) <> True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_correlated_filtered_collection() :
|
|
AssertSql(
|
|
@"SELECT [g].[FullName]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND [g].[CityOrBirthName] IN ('Ephyra', 'Hanover')",
|
|
//
|
|
@"@_outer_FullName='Augustus Cole' (Nullable = false) (Size = 13)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE (([w].[Name] <> 'Lancer') OR [w].[Name] IS NULL) AND (@_outer_FullName = [w].[OwnerFullName])",
|
|
//
|
|
@"@_outer_FullName='Dominic Santiago' (Nullable = false) (Size = 16)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE (([w].[Name] <> 'Lancer') OR [w].[Name] IS NULL) AND (@_outer_FullName = [w].[OwnerFullName])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Navigation_access_on_derived_entity_using_cast() :
|
|
AssertSql(
|
|
@"SELECT [f].[Name], [t].[ThreatLevel] AS [Threat]
|
|
FROM ([Faction] AS [f]
|
|
LEFT JOIN (
|
|
SELECT [f#Commander].*
|
|
FROM [LocustLeader] AS [f#Commander]
|
|
WHERE [f#Commander].[Discriminator] = 'LocustCommander'
|
|
) AS [t] ON [f].[CommanderName] = [t].[Name])
|
|
WHERE ([f].[Discriminator] = 'LocustHorde') AND ([f].[Discriminator] = 'LocustHorde')
|
|
ORDER BY [f].[Name]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_predicate() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE (([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL) AND ([t0].[HasSoulPatch] = True)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_array_initializers() :
|
|
AssertSql(
|
|
@"SELECT [t0].[SquadId]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_projection_into_anonymous_type() :
|
|
AssertSql(
|
|
@"SELECT [t0].[SquadId]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Non_unicode_string_literals_is_used_for_non_unicode_column_with_subquery() :
|
|
AssertSql(
|
|
@"SELECT [c].[Name], [c].[Location]
|
|
FROM [City] AS [c]
|
|
WHERE ([c].[Location] = 'Unknown') AND ((
|
|
SELECT COUNT(*)
|
|
FROM [Gear] AS [g]
|
|
WHERE ([g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[Nickname] = 'Paduk')) AND ([c].[Name] = [g].[CityOrBirthName])
|
|
) = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Bitwise_projects_values_in_select() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 IIf(
|
|
([g].[Rank] BAND 1) = 1,
|
|
True,
|
|
False
|
|
) AS [BitwiseTrue], IIf(
|
|
([g].[Rank] BAND 1) = 2,
|
|
True,
|
|
False
|
|
) AS [BitwiseFalse], [g].[Rank] BAND 1 AS [BitwiseValue]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND 1) = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_conditional_expression() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE IIf(
|
|
[t0].[HasSoulPatch] = True,
|
|
True,
|
|
False
|
|
) = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Subquery_with_result_operator_is_not_lifted() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT [t].[FullName]
|
|
FROM (
|
|
SELECT TOP @__p_0 [g].*
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[HasSoulPatch] = False)
|
|
ORDER BY [g].[FullName]
|
|
) AS [t]
|
|
ORDER BY [t].[Rank]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_null_propagation_negative1() :
|
|
AssertSql(
|
|
@"SELECT IIf(
|
|
[g].[LeaderNickname] IS NOT NULL,
|
|
IIf(
|
|
CInt(IIf(IsNull(Len([g].[Nickname])),0,Len([g].[Nickname]))) = 5,
|
|
True,
|
|
False
|
|
),
|
|
NULL
|
|
)
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Null_propagation_optimization6() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (CInt(IIf(IsNull(Len([g].[LeaderNickname])),0,Len([g].[LeaderNickname]))) = 5)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Null_propagation_optimization4() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (CInt(IIf(IsNull(Len([g].[LeaderNickname])),0,Len([g].[LeaderNickname]))) = 5)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Non_unicode_string_literals_is_used_for_non_unicode_column_with_contains() :
|
|
AssertSql(
|
|
@"SELECT [c].[Name], [c].[Location]
|
|
FROM [City] AS [c]
|
|
WHERE Instr(1, [c].[Location], 'Jacinto', 0) > 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_ternary_operation_multiple_conditions() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
([w].[AmmunitionType] = 2) AND ([w].[SynergyWithId] = 1),
|
|
'Yes',
|
|
'No'
|
|
) AS [IsCartidge]
|
|
FROM [Weapon] AS [w]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Coalesce_operator_in_projection_with_other_conditions() :
|
|
AssertSql(
|
|
@"SELECT IIf(
|
|
([w].[AmmunitionType] = 1) AND (IIf(IsNull([w].[IsAutomatic]), False, [w].[IsAutomatic]) = True),
|
|
True,
|
|
False
|
|
)
|
|
FROM [Weapon] AS [w]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_bitwise_and_nullable_enum_with_nullable_parameter() :
|
|
AssertSql(
|
|
@"@__ammunitionType_0='Cartridge'
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE ([w].[AmmunitionType] BAND @__ammunitionType_0) > 0",
|
|
//
|
|
@"@__ammunitionType_0='' (Nullable = false) (DbType = String)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE ([w].[AmmunitionType] BAND @__ammunitionType_0) > 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_bitwise_and_nullable_enum_with_nullable_parameter() :
|
|
AssertSql(
|
|
@"@__ammunitionType_0='Cartridge'
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE ([w].[AmmunitionType] BAND @__ammunitionType_0) > 0",
|
|
//
|
|
@"@__ammunitionType_0='' (Nullable = false) (DbType = String)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE ([w].[AmmunitionType] BAND @__ammunitionType_0) > 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_bitwise_and_nullable_enum_with_nullable_parameter() :
|
|
AssertSql(
|
|
@"@__ammunitionType_0='Cartridge'
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE ([w].[AmmunitionType] BAND @__ammunitionType_0) > 0",
|
|
//
|
|
@"@__ammunitionType_0='' (Nullable = false) (DbType = String)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE ([w].[AmmunitionType] BAND @__ammunitionType_0) > 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Null_propagation_optimization5() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (CInt(IIf(IsNull(Len([g].[LeaderNickname])),0,Len([g].[LeaderNickname]))) = 5)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_predicate_negated_complex2() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE IIf(
|
|
([t0].[HasSoulPatch] <> True) AND [t0].[HasSoulPatch] IS NOT NULL,
|
|
False,
|
|
[t0].[HasSoulPatch]
|
|
) <> True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Count_with_optional_navigation_is_translated_to_sql() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM ([Gear] AS [g]
|
|
LEFT JOIN [CogTag] AS [g#Tag] ON ([g].[Nickname] = [g#Tag].[GearNickName]) AND ([g].[SquadId] = [g#Tag].[GearSquadId]))
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g#Tag].[Note] <> 'Foo') OR [g#Tag].[Note] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Client_method_on_collection_navigation_in_predicate_accessed_by_ef_property() :
|
|
AssertSql(
|
|
@"SELECT [g].[FullName], [g].[Nickname]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[HasSoulPatch] = False)",
|
|
//
|
|
@"@_outer_FullName='Augustus Cole' (Nullable = false) (Size = 13)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE @_outer_FullName = [w].[OwnerFullName]",
|
|
//
|
|
@"@_outer_FullName='Dominic Santiago' (Nullable = false) (Size = 16)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE @_outer_FullName = [w].[OwnerFullName]",
|
|
//
|
|
@"@_outer_FullName='Garron Paduk' (Nullable = false) (Size = 12)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE @_outer_FullName = [w].[OwnerFullName]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_nested_ternary_operations() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
[w].[IsAutomatic] = False,
|
|
IIf(
|
|
[w].[AmmunitionType] = 1,
|
|
'ManualCartridge',
|
|
'Manual'
|
|
),
|
|
'Auto'
|
|
) AS [IsManualCartidge]
|
|
FROM [Weapon] AS [w]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Subquery_containing_SelectMany_projecting_main_from_clause_gets_lifted() :
|
|
AssertSql(
|
|
@"SELECT [gear].[FullName]
|
|
FROM [Gear] AS [gear]
|
|
, [CogTag] AS [tag]
|
|
WHERE [gear].[Discriminator] IN ('Officer', 'Gear') AND ([gear].[HasSoulPatch] = True)
|
|
ORDER BY [gear].[FullName], [tag].[Note]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Null_propagation_optimization2() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (RIGHT([g].[LeaderNickname], Len('us')) = 'us')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_Where_Navigation() :
|
|
AssertSql(
|
|
@"SELECT [ct].[Id], [ct].[GearNickName], [ct].[GearSquadId], [ct].[Note]
|
|
FROM ([CogTag] AS [ct]
|
|
LEFT JOIN (
|
|
SELECT [ct#Gear].*
|
|
FROM [Gear] AS [ct#Gear]
|
|
WHERE [ct#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t] ON ([ct].[GearNickName] = [t].[Nickname]) AND ([ct].[GearSquadId] = [t].[SquadId]))
|
|
WHERE [t].[Nickname] = 'Marcus'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.FirstOrDefault_with_manually_created_groupjoin_is_translated_to_sql() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [s].[Id], [s].[InternalNumber], [s].[Name]
|
|
FROM ([Squad] AS [s]
|
|
LEFT JOIN (
|
|
SELECT [g].*
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t] ON [s].[Id] = [t].[SquadId])
|
|
WHERE [s].[Name] = 'Kilo'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_list_initializers() :
|
|
AssertSql(
|
|
@"SELECT [t0].[SquadId], [t0].[SquadId] + 1
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_predicate2() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE [t0].[HasSoulPatch] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Client_method_on_collection_navigation_in_predicate() :
|
|
AssertSql(
|
|
@"SELECT [g].[FullName], [g].[Nickname]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[HasSoulPatch] = True)",
|
|
//
|
|
@"@_outer_FullName='Damon Baird' (Nullable = false) (Size = 11)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE @_outer_FullName = [w].[OwnerFullName]",
|
|
//
|
|
@"@_outer_FullName='Marcus Fenix' (Nullable = false) (Size = 12)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE @_outer_FullName = [w].[OwnerFullName]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_predicate_negated() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t0].[HasSoulPatch] <> True) AND [t0].[HasSoulPatch] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_enum_has_flag_with_non_nullable_parameter() :
|
|
AssertSql(
|
|
@"@__parameter_0='Corporal'
|
|
|
|
SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND @__parameter_0) = @__parameter_0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_DTOs() :
|
|
AssertSql(
|
|
@"SELECT [t0].[SquadId] AS [Id]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_ternary_operation_with_has_value_not_null() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
[w].[AmmunitionType] IS NOT NULL AND ([w].[AmmunitionType] = 1),
|
|
'Yes',
|
|
'No'
|
|
) AS [IsCartidge]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[AmmunitionType] IS NOT NULL AND ([w].[AmmunitionType] = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_orderby() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL
|
|
ORDER BY [t0].[SquadId]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_ternary_operation_with_boolean() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
[w].[IsAutomatic] = True,
|
|
1,
|
|
0
|
|
) AS [Num]
|
|
FROM [Weapon] AS [w]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_inverted_boolean() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
[w].[IsAutomatic] = False,
|
|
True,
|
|
False
|
|
) AS [Manual]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[IsAutomatic] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Client_method_on_collection_navigation_in_outer_join_key() :
|
|
AssertSql(
|
|
@"SELECT [g].[FullName], [g].[Nickname]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear')",
|
|
//
|
|
@"@_outer_FullName1='Damon Baird' (Nullable = false) (Size = 11)
|
|
|
|
SELECT [w0].[Id], [w0].[AmmunitionType], [w0].[IsAutomatic], [w0].[Name], [w0].[OwnerFullName], [w0].[SynergyWithId]
|
|
FROM [Weapon] AS [w0]
|
|
WHERE @_outer_FullName1 = [w0].[OwnerFullName]",
|
|
//
|
|
@"@_outer_FullName1='Augustus Cole' (Nullable = false) (Size = 13)
|
|
|
|
SELECT [w0].[Id], [w0].[AmmunitionType], [w0].[IsAutomatic], [w0].[Name], [w0].[OwnerFullName], [w0].[SynergyWithId]
|
|
FROM [Weapon] AS [w0]
|
|
WHERE @_outer_FullName1 = [w0].[OwnerFullName]",
|
|
//
|
|
@"@_outer_FullName1='Dominic Santiago' (Nullable = false) (Size = 16)
|
|
|
|
SELECT [w0].[Id], [w0].[AmmunitionType], [w0].[IsAutomatic], [w0].[Name], [w0].[OwnerFullName], [w0].[SynergyWithId]
|
|
FROM [Weapon] AS [w0]
|
|
WHERE @_outer_FullName1 = [w0].[OwnerFullName]",
|
|
//
|
|
@"@_outer_FullName1='Marcus Fenix' (Nullable = false) (Size = 12)
|
|
|
|
SELECT [w0].[Id], [w0].[AmmunitionType], [w0].[IsAutomatic], [w0].[Name], [w0].[OwnerFullName], [w0].[SynergyWithId]
|
|
FROM [Weapon] AS [w0]
|
|
WHERE @_outer_FullName1 = [w0].[OwnerFullName]",
|
|
//
|
|
@"@_outer_FullName1='Garron Paduk' (Nullable = false) (Size = 12)
|
|
|
|
SELECT [w0].[Id], [w0].[AmmunitionType], [w0].[IsAutomatic], [w0].[Name], [w0].[OwnerFullName], [w0].[SynergyWithId]
|
|
FROM [Weapon] AS [w0]
|
|
WHERE @_outer_FullName1 = [w0].[OwnerFullName]",
|
|
//
|
|
@"SELECT [o].[FullName], [o].[Nickname] AS [o]
|
|
FROM [Gear] AS [o]
|
|
WHERE ([o].[Discriminator] = 'Officer') AND ([o].[HasSoulPatch] = True)",
|
|
//
|
|
@"@_outer_FullName='Damon Baird' (Nullable = false) (Size = 11)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE @_outer_FullName = [w].[OwnerFullName]",
|
|
//
|
|
@"@_outer_FullName='Marcus Fenix' (Nullable = false) (Size = 12)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE @_outer_FullName = [w].[OwnerFullName]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_projection() :
|
|
AssertSql(
|
|
@"SELECT [t0].[SquadId]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_groupby() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note], [t0].[SquadId]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL
|
|
ORDER BY [t0].[SquadId]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_multiple_conditions() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
([w].[IsAutomatic] = False) AND ([w].[SynergyWithId] = 1),
|
|
True,
|
|
False
|
|
) AS [IsCartidge]
|
|
FROM [Weapon] AS [w]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Null_propagation_optimization3() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (RIGHT([g].[LeaderNickname], Len('us')) = 'us')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_correlated_filtered_collection_with_composite_key() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] = 'Officer'",
|
|
//
|
|
@"@_outer_Nickname='Baird' (Nullable = false) (Size = 5)
|
|
@_outer_SquadId='1'
|
|
|
|
SELECT [r].[Nickname], [r].[SquadId], [r].[AssignedCityName], [r].[CityOrBirthName], [r].[Discriminator], [r].[FullName], [r].[HasSoulPatch], [r].[LeaderNickname], [r].[LeaderSquadId], [r].[Rank]
|
|
FROM [Gear] AS [r]
|
|
WHERE ([r].[Discriminator] IN ('Officer', 'Gear') AND ([r].[Nickname] <> 'Dom')) AND ((@_outer_Nickname = [r].[LeaderNickname]) AND (@_outer_SquadId = [r].[LeaderSquadId]))",
|
|
//
|
|
@"@_outer_Nickname='Marcus' (Nullable = false) (Size = 6)
|
|
@_outer_SquadId='1'
|
|
|
|
SELECT [r].[Nickname], [r].[SquadId], [r].[AssignedCityName], [r].[CityOrBirthName], [r].[Discriminator], [r].[FullName], [r].[HasSoulPatch], [r].[LeaderNickname], [r].[LeaderSquadId], [r].[Rank]
|
|
FROM [Gear] AS [r]
|
|
WHERE ([r].[Discriminator] IN ('Officer', 'Gear') AND ([r].[Nickname] <> 'Dom')) AND ((@_outer_Nickname = [r].[LeaderNickname]) AND (@_outer_SquadId = [r].[LeaderSquadId]))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Subquery_created_by_include_gets_lifted_nested() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank], [g#CityOfBirth].[Name], [g#CityOfBirth].[Location]
|
|
FROM ([Gear] AS [g]
|
|
INNER JOIN [City] AS [g#CityOfBirth] ON [g].[CityOrBirthName] = [g#CityOfBirth].[Name])
|
|
WHERE ([g].[Discriminator] IN ('Officer', 'Gear') AND EXISTS (
|
|
SELECT 1
|
|
FROM [Weapon] AS [w]
|
|
WHERE [g].[FullName] = [w].[OwnerFullName])) AND ([g].[HasSoulPatch] = False)
|
|
ORDER BY [g].[Nickname], [g].[Rank]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_binary_expression() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t0].[HasSoulPatch] = True) OR (Instr(1, [t].[Note], 'Cole', 0) > 0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_has_flag_with_nullable_parameter() :
|
|
AssertSql(
|
|
@"@__parameter_0='Corporal'
|
|
|
|
SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND @__parameter_0) = @__parameter_0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Singleton_Navigation_With_Member_Access() :
|
|
AssertSql(
|
|
@"SELECT [t].[CityOrBirthName] AS [B]
|
|
FROM ([CogTag] AS [ct]
|
|
LEFT JOIN (
|
|
SELECT [ct#Gear].*
|
|
FROM [Gear] AS [ct#Gear]
|
|
WHERE [ct#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t] ON ([ct].[GearNickName] = [t].[Nickname]) AND ([ct].[GearSquadId] = [t].[SquadId]))
|
|
WHERE ([t].[Nickname] = 'Marcus') AND (([t].[CityOrBirthName] <> 'Ephyra') OR [t].[CityOrBirthName] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_enum_has_flag() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND 1) = 1)",
|
|
//
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND 5) = 5)",
|
|
//
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND 1) = 1)",
|
|
//
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND 1) = 1)",
|
|
//
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ((1 BAND [g].[Rank]) = [g].[Rank])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Navigation_access_via_EFProperty_on_derived_entity_using_cast() :
|
|
AssertSql(
|
|
@"SELECT [f].[Name], [t].[ThreatLevel] AS [Threat]
|
|
FROM ([Faction] AS [f]
|
|
LEFT JOIN (
|
|
SELECT [f#Commander].*
|
|
FROM [LocustLeader] AS [f#Commander]
|
|
WHERE [f#Commander].[Discriminator] = 'LocustCommander'
|
|
) AS [t] ON [f].[CommanderName] = [t].[Name])
|
|
WHERE ([f].[Discriminator] = 'LocustHorde') AND ([f].[Discriminator] = 'LocustHorde')
|
|
ORDER BY [f].[Name]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_null_propagation_negative2() :
|
|
AssertSql(
|
|
@"SELECT IIf(
|
|
[g1].[LeaderNickname] IS NOT NULL,
|
|
[g2].[LeaderNickname],
|
|
NULL
|
|
)
|
|
FROM [Gear] AS [g1]
|
|
, [Gear] AS [g2]
|
|
WHERE [g1].[Discriminator] IN ('Officer', 'Gear')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Coalesce_operator_in_predicate_with_other_conditions() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE ([w].[AmmunitionType] = 1) AND (IIf(IsNull([w].[IsAutomatic]), False, [w].[IsAutomatic]) = True)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_nullable_enum_with_nullable_parameter() :
|
|
AssertSql(
|
|
@"@__ammunitionType_0='Cartridge'
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[AmmunitionType] = @__ammunitionType_0",
|
|
//
|
|
@"SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[AmmunitionType] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Distinct_with_optional_navigation_is_translated_to_sql() :
|
|
AssertSql(
|
|
@"SELECT DISTINCT [g].[HasSoulPatch]
|
|
FROM ([Gear] AS [g]
|
|
LEFT JOIN [CogTag] AS [g#Tag] ON ([g].[Nickname] = [g#Tag].[GearNickName]) AND ([g].[SquadId] = [g#Tag].[GearSquadId]))
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g#Tag].[Note] <> 'Foo') OR [g#Tag].[Note] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Subquery_containing_join_projecting_main_from_clause_gets_lifted() :
|
|
AssertSql(
|
|
@"SELECT [gear].[Nickname]
|
|
FROM ([Gear] AS [gear]
|
|
INNER JOIN [CogTag] AS [tag] ON [gear].[Nickname] = [tag].[GearNickName])
|
|
WHERE [gear].[Discriminator] IN ('Officer', 'Gear')
|
|
ORDER BY [gear].[Nickname], [tag].[Note]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_take() :
|
|
AssertSql(
|
|
@"SELECT [t0].[SquadId]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Navigation_access_on_derived_materialized_entity_using_cast() :
|
|
AssertSql(
|
|
@"SELECT [f].[Id], [f].[CapitalName], [f].[Discriminator], [f].[Name], [f].[CommanderName], [f].[Eradicated], [t].[ThreatLevel]
|
|
FROM ([Faction] AS [f]
|
|
LEFT JOIN (
|
|
SELECT [f#Commander].*
|
|
FROM [LocustLeader] AS [f#Commander]
|
|
WHERE [f#Commander].[Discriminator] = 'LocustCommander'
|
|
) AS [t] ON [f].[CommanderName] = [t].[Name])
|
|
WHERE ([f].[Discriminator] = 'LocustHorde') AND ([f].[Discriminator] = 'LocustHorde')
|
|
ORDER BY [f].[Name]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_Navigation_Null_Coalesce_To_Clr_Type() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 CBool(IIf(IsNull(IIf(IsNull([w#SynergyWith].[IsAutomatic]), False, [w#SynergyWith].[IsAutomatic])),0,IIf(IsNull([w#SynergyWith].[IsAutomatic]), False, [w#SynergyWith].[IsAutomatic]))) AS [IsAutomatic]
|
|
FROM ([Weapon] AS [w]
|
|
LEFT JOIN [Weapon] AS [w#SynergyWith] ON [w].[SynergyWithId] = [w#SynergyWith].[Id])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Non_unicode_parameter_is_used_for_non_unicode_column() :
|
|
AssertSql(
|
|
@"@__value_0='Unknown' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[Name], [c].[Location]
|
|
FROM [City] AS [c]
|
|
WHERE [c].[Location] = @__value_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_all() :
|
|
AssertSql(
|
|
@"SELECT IIf(
|
|
NOT EXISTS (
|
|
SELECT 1
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE (([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL) AND ([t0].[HasSoulPatch] = False)),
|
|
True,
|
|
False
|
|
)
|
|
FROM (SELECT COUNT(*) FROM MSysAccessStorage)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Subquery_containing_join_gets_lifted_clashing_names() :
|
|
AssertSql(
|
|
@"SELECT [gear].[Nickname]
|
|
FROM (([Gear] AS [gear]
|
|
INNER JOIN [CogTag] AS [tag] ON [gear].[Nickname] = [tag].[GearNickName])
|
|
INNER JOIN [CogTag] AS [tag0] ON [gear].[Nickname] = [tag0].[GearNickName])
|
|
WHERE [gear].[Discriminator] IN ('Officer', 'Gear') AND (([tag].[GearNickName] <> 'Cole Train') OR [tag].[GearNickName] IS NULL)
|
|
ORDER BY [gear].[Nickname], [tag0].[Id], [tag].[Note]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Subquery_is_not_lifted_from_additional_from_clause() :
|
|
AssertSql(
|
|
@"SELECT [g1].[FullName] AS [Name1]
|
|
FROM [Gear] AS [g1]
|
|
WHERE [g1].[Discriminator] IN ('Officer', 'Gear') AND ([g1].[HasSoulPatch] = True)
|
|
ORDER BY [g1].[FullName]",
|
|
//
|
|
@"SELECT [g0].[HasSoulPatch], [g0].[FullName]
|
|
FROM [Gear] AS [g0]
|
|
WHERE [g0].[Discriminator] IN ('Officer', 'Gear')
|
|
ORDER BY [g0].[Rank]",
|
|
//
|
|
@"SELECT [g0].[HasSoulPatch], [g0].[FullName]
|
|
FROM [Gear] AS [g0]
|
|
WHERE [g0].[Discriminator] IN ('Officer', 'Gear')
|
|
ORDER BY [g0].[Rank]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_is_properly_lifted_from_subquery_created_by_include() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank], [g#Tag].[Id], [g#Tag].[GearNickName], [g#Tag].[GearSquadId], [g#Tag].[Note]
|
|
FROM ([Gear] AS [g]
|
|
LEFT JOIN [CogTag] AS [g#Tag] ON ([g].[Nickname] = [g#Tag].[GearNickName]) AND ([g].[SquadId] = [g#Tag].[GearSquadId]))
|
|
WHERE ([g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[FullName] <> 'Augustus Cole')) AND ([g].[HasSoulPatch] = False)
|
|
ORDER BY [g].[FullName]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_comparison_with_null() :
|
|
AssertSql(
|
|
@"@__ammunitionType_1='Cartridge'
|
|
@__ammunitionType_0='Cartridge'
|
|
|
|
SELECT [w].[Id], IIf(
|
|
[w].[AmmunitionType] = @__ammunitionType_1,
|
|
True,
|
|
False
|
|
) AS [Cartidge]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[AmmunitionType] = @__ammunitionType_0",
|
|
//
|
|
@"SELECT [w].[Id], IIf(
|
|
[w].[AmmunitionType] IS NULL,
|
|
True,
|
|
False
|
|
) AS [Cartidge]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[AmmunitionType] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_ternary_operation_with_inverted_boolean() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
[w].[IsAutomatic] = False,
|
|
1,
|
|
0
|
|
) AS [Num]
|
|
FROM [Weapon] AS [w]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_length_of_string_property() :
|
|
AssertSql(
|
|
@"SELECT [w].[Name], CInt(IIf(IsNull(Len([w].[Name])),0,Len([w].[Name]))) AS [Length]
|
|
FROM [Weapon] AS [w]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_enum_has_flag() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 IIf(
|
|
([g].[Rank] BAND 1) = 1,
|
|
True,
|
|
False
|
|
) AS [hasFlagTrue], IIf(
|
|
([g].[Rank] BAND 2) = 2,
|
|
True,
|
|
False
|
|
) AS [hasFlagFalse]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND 1) = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Subquery_containing_left_join_projecting_main_from_clause_gets_lifted() :
|
|
AssertSql(
|
|
@"SELECT [gear].[Nickname]
|
|
FROM ([Gear] AS [gear]
|
|
LEFT JOIN [CogTag] AS [tag] ON [gear].[Nickname] = [tag].[GearNickName])
|
|
WHERE [gear].[Discriminator] IN ('Officer', 'Gear')
|
|
ORDER BY [gear].[Nickname], [gear].[Rank]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_skip() :
|
|
AssertSql(
|
|
@"SELECT [t0].[SquadId]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Client_method_on_collection_navigation_in_order_by() :
|
|
AssertSql(
|
|
@"SELECT [g].[FullName], [g].[Nickname]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[HasSoulPatch] = False)",
|
|
//
|
|
@"@_outer_FullName='Augustus Cole' (Nullable = false) (Size = 13)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE @_outer_FullName = [w].[OwnerFullName]",
|
|
//
|
|
@"@_outer_FullName='Dominic Santiago' (Nullable = false) (Size = 16)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE @_outer_FullName = [w].[OwnerFullName]",
|
|
//
|
|
@"@_outer_FullName='Garron Paduk' (Nullable = false) (Size = 12)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE @_outer_FullName = [w].[OwnerFullName]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_ternary_operation_multiple_conditions_2() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
([w].[IsAutomatic] = False) AND ([w].[SynergyWithId] = 1),
|
|
'Yes',
|
|
'No'
|
|
) AS [IsCartidge]
|
|
FROM [Weapon] AS [w]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Complex_predicate_with_AndAlso_and_nullable_bool_property() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM ([Weapon] AS [w]
|
|
LEFT JOIN (
|
|
SELECT [w#Owner].*
|
|
FROM [Gear] AS [w#Owner]
|
|
WHERE [w#Owner].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t] ON [w].[OwnerFullName] = [t].[FullName])
|
|
WHERE ([w].[Id] <> 50) AND ([t].[HasSoulPatch] = False)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Coalesce_operator_in_predicate() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE IIf(IsNull([w].[IsAutomatic]), False, [w].[IsAutomatic]) = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Subquery_is_lifted_from_main_from_clause_of_SelectMany() :
|
|
AssertSql(
|
|
@"SELECT [g].[FullName] AS [Name1], [g2].[FullName] AS [Name2]
|
|
FROM [Gear] AS [g]
|
|
, [Gear] AS [g2]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[HasSoulPatch] = True) AND ([g2].[HasSoulPatch] = False))
|
|
ORDER BY [g].[FullName], [g].[Rank]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_contains() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE (([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL) AND [t0].[SquadId] IN (
|
|
SELECT [g].[SquadId]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear')
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_predicate_negated_complex1() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE IIf(
|
|
[t0].[HasSoulPatch] = True,
|
|
True,
|
|
[t0].[HasSoulPatch]
|
|
) <> True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_correlated_filtered_collection() :
|
|
AssertSql(
|
|
@"SELECT [g].[FullName]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND [g].[CityOrBirthName] IN ('Ephyra', 'Hanover')",
|
|
//
|
|
@"@_outer_FullName='Augustus Cole' (Nullable = false) (Size = 13)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE (([w].[Name] <> 'Lancer') OR [w].[Name] IS NULL) AND (@_outer_FullName = [w].[OwnerFullName])",
|
|
//
|
|
@"@_outer_FullName='Dominic Santiago' (Nullable = false) (Size = 16)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE (([w].[Name] <> 'Lancer') OR [w].[Name] IS NULL) AND (@_outer_FullName = [w].[OwnerFullName])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Navigation_access_on_derived_entity_using_cast() :
|
|
AssertSql(
|
|
@"SELECT [f].[Name], [t].[ThreatLevel] AS [Threat]
|
|
FROM ([Faction] AS [f]
|
|
LEFT JOIN (
|
|
SELECT [f#Commander].*
|
|
FROM [LocustLeader] AS [f#Commander]
|
|
WHERE [f#Commander].[Discriminator] = 'LocustCommander'
|
|
) AS [t] ON [f].[CommanderName] = [t].[Name])
|
|
WHERE ([f].[Discriminator] = 'LocustHorde') AND ([f].[Discriminator] = 'LocustHorde')
|
|
ORDER BY [f].[Name]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_predicate() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE (([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL) AND ([t0].[HasSoulPatch] = True)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_array_initializers() :
|
|
AssertSql(
|
|
@"SELECT [t0].[SquadId]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_projection_into_anonymous_type() :
|
|
AssertSql(
|
|
@"SELECT [t0].[SquadId]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Non_unicode_string_literals_is_used_for_non_unicode_column_with_subquery() :
|
|
AssertSql(
|
|
@"SELECT [c].[Name], [c].[Location]
|
|
FROM [City] AS [c]
|
|
WHERE ([c].[Location] = 'Unknown') AND ((
|
|
SELECT COUNT(*)
|
|
FROM [Gear] AS [g]
|
|
WHERE ([g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[Nickname] = 'Paduk')) AND ([c].[Name] = [g].[CityOrBirthName])
|
|
) = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_conditional_expression() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE IIf(
|
|
[t0].[HasSoulPatch] = True,
|
|
True,
|
|
False
|
|
) = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Subquery_with_result_operator_is_not_lifted() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT [t].[FullName]
|
|
FROM (
|
|
SELECT TOP @__p_0 [g].*
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[HasSoulPatch] = False)
|
|
ORDER BY [g].[FullName]
|
|
) AS [t]
|
|
ORDER BY [t].[Rank]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_null_propagation_negative1() :
|
|
AssertSql(
|
|
@"SELECT IIf(
|
|
[g].[LeaderNickname] IS NOT NULL,
|
|
IIf(
|
|
CInt(IIf(IsNull(Len([g].[Nickname])),0,Len([g].[Nickname]))) = 5,
|
|
True,
|
|
False
|
|
),
|
|
NULL
|
|
)
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Null_propagation_optimization6() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (CInt(IIf(IsNull(Len([g].[LeaderNickname])),0,Len([g].[LeaderNickname]))) = 5)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Null_propagation_optimization4() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (CInt(IIf(IsNull(Len([g].[LeaderNickname])),0,Len([g].[LeaderNickname]))) = 5)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Non_unicode_string_literals_is_used_for_non_unicode_column_with_contains() :
|
|
AssertSql(
|
|
@"SELECT [c].[Name], [c].[Location]
|
|
FROM [City] AS [c]
|
|
WHERE Instr(1, [c].[Location], 'Jacinto', 0) > 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_ternary_operation_multiple_conditions() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
([w].[AmmunitionType] = 2) AND ([w].[SynergyWithId] = 1),
|
|
'Yes',
|
|
'No'
|
|
) AS [IsCartidge]
|
|
FROM [Weapon] AS [w]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Coalesce_operator_in_projection_with_other_conditions() :
|
|
AssertSql(
|
|
@"SELECT IIf(
|
|
([w].[AmmunitionType] = 1) AND (IIf(IsNull([w].[IsAutomatic]), False, [w].[IsAutomatic]) = True),
|
|
True,
|
|
False
|
|
)
|
|
FROM [Weapon] AS [w]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Null_propagation_optimization5() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (CInt(IIf(IsNull(Len([g].[LeaderNickname])),0,Len([g].[LeaderNickname]))) = 5)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_predicate_negated_complex2() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE IIf(
|
|
([t0].[HasSoulPatch] <> True) AND [t0].[HasSoulPatch] IS NOT NULL,
|
|
False,
|
|
[t0].[HasSoulPatch]
|
|
) <> True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Count_with_optional_navigation_is_translated_to_sql() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM ([Gear] AS [g]
|
|
LEFT JOIN [CogTag] AS [g#Tag] ON ([g].[Nickname] = [g#Tag].[GearNickName]) AND ([g].[SquadId] = [g#Tag].[GearSquadId]))
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g#Tag].[Note] <> 'Foo') OR [g#Tag].[Note] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_nested_ternary_operations() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
[w].[IsAutomatic] = False,
|
|
IIf(
|
|
[w].[AmmunitionType] = 1,
|
|
'ManualCartridge',
|
|
'Manual'
|
|
),
|
|
'Auto'
|
|
) AS [IsManualCartidge]
|
|
FROM [Weapon] AS [w]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Null_propagation_optimization2() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (RIGHT([g].[LeaderNickname], Len('us')) = 'us')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_Where_Navigation() :
|
|
AssertSql(
|
|
@"SELECT [ct].[Id], [ct].[GearNickName], [ct].[GearSquadId], [ct].[Note]
|
|
FROM ([CogTag] AS [ct]
|
|
LEFT JOIN (
|
|
SELECT [ct#Gear].*
|
|
FROM [Gear] AS [ct#Gear]
|
|
WHERE [ct#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t] ON ([ct].[GearNickName] = [t].[Nickname]) AND ([ct].[GearSquadId] = [t].[SquadId]))
|
|
WHERE [t].[Nickname] = 'Marcus'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.FirstOrDefault_with_manually_created_groupjoin_is_translated_to_sql() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [s].[Id], [s].[InternalNumber], [s].[Name]
|
|
FROM ([Squad] AS [s]
|
|
LEFT JOIN (
|
|
SELECT [g].*
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t] ON [s].[Id] = [t].[SquadId])
|
|
WHERE [s].[Name] = 'Kilo'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_list_initializers() :
|
|
AssertSql(
|
|
@"SELECT [t0].[SquadId], [t0].[SquadId] + 1
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_predicate2() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE [t0].[HasSoulPatch] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_predicate_negated() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t0].[HasSoulPatch] <> True) AND [t0].[HasSoulPatch] IS NOT NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_DTOs() :
|
|
AssertSql(
|
|
@"SELECT [t0].[SquadId] AS [Id]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_orderby() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL
|
|
ORDER BY [t0].[SquadId]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_ternary_operation_with_boolean() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
[w].[IsAutomatic] = True,
|
|
1,
|
|
0
|
|
) AS [Num]
|
|
FROM [Weapon] AS [w]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_inverted_boolean() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
[w].[IsAutomatic] = False,
|
|
True,
|
|
False
|
|
) AS [Manual]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[IsAutomatic] = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_projection() :
|
|
AssertSql(
|
|
@"SELECT [t0].[SquadId]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_groupby() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note], [t0].[SquadId]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL
|
|
ORDER BY [t0].[SquadId]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_multiple_conditions() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
([w].[IsAutomatic] = False) AND ([w].[SynergyWithId] = 1),
|
|
True,
|
|
False
|
|
) AS [IsCartidge]
|
|
FROM [Weapon] AS [w]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Null_propagation_optimization3() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (RIGHT([g].[LeaderNickname], Len('us')) = 'us')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_correlated_filtered_collection_with_composite_key() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] = 'Officer'",
|
|
//
|
|
@"@_outer_Nickname='Baird' (Nullable = false) (Size = 5)
|
|
@_outer_SquadId='1'
|
|
|
|
SELECT [r].[Nickname], [r].[SquadId], [r].[AssignedCityName], [r].[CityOrBirthName], [r].[Discriminator], [r].[FullName], [r].[HasSoulPatch], [r].[LeaderNickname], [r].[LeaderSquadId], [r].[Rank]
|
|
FROM [Gear] AS [r]
|
|
WHERE ([r].[Discriminator] IN ('Officer', 'Gear') AND ([r].[Nickname] <> 'Dom')) AND ((@_outer_Nickname = [r].[LeaderNickname]) AND (@_outer_SquadId = [r].[LeaderSquadId]))",
|
|
//
|
|
@"@_outer_Nickname='Marcus' (Nullable = false) (Size = 6)
|
|
@_outer_SquadId='1'
|
|
|
|
SELECT [r].[Nickname], [r].[SquadId], [r].[AssignedCityName], [r].[CityOrBirthName], [r].[Discriminator], [r].[FullName], [r].[HasSoulPatch], [r].[LeaderNickname], [r].[LeaderSquadId], [r].[Rank]
|
|
FROM [Gear] AS [r]
|
|
WHERE ([r].[Discriminator] IN ('Officer', 'Gear') AND ([r].[Nickname] <> 'Dom')) AND ((@_outer_Nickname = [r].[LeaderNickname]) AND (@_outer_SquadId = [r].[LeaderSquadId]))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_binary_expression() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t0].[HasSoulPatch] = True) OR (Instr(1, [t].[Note], 'Cole', 0) > 0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Navigation_access_via_EFProperty_on_derived_entity_using_cast() :
|
|
AssertSql(
|
|
@"SELECT [f].[Name], [t].[ThreatLevel] AS [Threat]
|
|
FROM ([Faction] AS [f]
|
|
LEFT JOIN (
|
|
SELECT [f#Commander].*
|
|
FROM [LocustLeader] AS [f#Commander]
|
|
WHERE [f#Commander].[Discriminator] = 'LocustCommander'
|
|
) AS [t] ON [f].[CommanderName] = [t].[Name])
|
|
WHERE ([f].[Discriminator] = 'LocustHorde') AND ([f].[Discriminator] = 'LocustHorde')
|
|
ORDER BY [f].[Name]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_null_propagation_negative2() :
|
|
AssertSql(
|
|
@"SELECT IIf(
|
|
[g1].[LeaderNickname] IS NOT NULL,
|
|
[g2].[LeaderNickname],
|
|
NULL
|
|
)
|
|
FROM [Gear] AS [g1]
|
|
, [Gear] AS [g2]
|
|
WHERE [g1].[Discriminator] IN ('Officer', 'Gear')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Distinct_with_optional_navigation_is_translated_to_sql() :
|
|
AssertSql(
|
|
@"SELECT DISTINCT [g].[HasSoulPatch]
|
|
FROM ([Gear] AS [g]
|
|
LEFT JOIN [CogTag] AS [g#Tag] ON ([g].[Nickname] = [g#Tag].[GearNickName]) AND ([g].[SquadId] = [g#Tag].[GearSquadId]))
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g#Tag].[Note] <> 'Foo') OR [g#Tag].[Note] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_take() :
|
|
AssertSql(
|
|
@"SELECT [t0].[SquadId]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Navigation_access_on_derived_materialized_entity_using_cast() :
|
|
AssertSql(
|
|
@"SELECT [f].[Id], [f].[CapitalName], [f].[Discriminator], [f].[Name], [f].[CommanderName], [f].[Eradicated], [t].[ThreatLevel]
|
|
FROM ([Faction] AS [f]
|
|
LEFT JOIN (
|
|
SELECT [f#Commander].*
|
|
FROM [LocustLeader] AS [f#Commander]
|
|
WHERE [f#Commander].[Discriminator] = 'LocustCommander'
|
|
) AS [t] ON [f].[CommanderName] = [t].[Name])
|
|
WHERE ([f].[Discriminator] = 'LocustHorde') AND ([f].[Discriminator] = 'LocustHorde')
|
|
ORDER BY [f].[Name]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Non_unicode_parameter_is_used_for_non_unicode_column() :
|
|
AssertSql(
|
|
@"@__value_0='Unknown' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[Name], [c].[Location]
|
|
FROM [City] AS [c]
|
|
WHERE [c].[Location] = @__value_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_all() :
|
|
AssertSql(
|
|
@"SELECT IIf(
|
|
NOT EXISTS (
|
|
SELECT 1
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE (([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL) AND ([t0].[HasSoulPatch] = False)),
|
|
True,
|
|
False
|
|
)
|
|
FROM (SELECT COUNT(*) FROM MSysAccessStorage)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_comparison_with_null() :
|
|
AssertSql(
|
|
@"@__ammunitionType_1='Cartridge'
|
|
@__ammunitionType_0='Cartridge'
|
|
|
|
SELECT [w].[Id], IIf(
|
|
[w].[AmmunitionType] = @__ammunitionType_1,
|
|
True,
|
|
False
|
|
) AS [Cartidge]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[AmmunitionType] = @__ammunitionType_0",
|
|
//
|
|
@"SELECT [w].[Id], IIf(
|
|
[w].[AmmunitionType] IS NULL,
|
|
True,
|
|
False
|
|
) AS [Cartidge]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[AmmunitionType] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_length_of_string_property() :
|
|
AssertSql(
|
|
@"SELECT [w].[Name], CInt(IIf(IsNull(Len([w].[Name])),0,Len([w].[Name]))) AS [Length]
|
|
FROM [Weapon] AS [w]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_enum_has_flag() :
|
|
AssertSql(
|
|
@"SELECT TOP 1 IIf(
|
|
([g].[Rank] BAND 1) = 1,
|
|
True,
|
|
False
|
|
) AS [hasFlagTrue], IIf(
|
|
([g].[Rank] BAND 2) = 2,
|
|
True,
|
|
False
|
|
) AS [hasFlagFalse]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND 1) = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_skip() :
|
|
AssertSql(
|
|
@"SELECT [t0].[SquadId]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_ternary_operation_multiple_conditions_2() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
([w].[IsAutomatic] = False) AND ([w].[SynergyWithId] = 1),
|
|
'Yes',
|
|
'No'
|
|
) AS [IsCartidge]
|
|
FROM [Weapon] AS [w]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Complex_predicate_with_AndAlso_and_nullable_bool_property() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM ([Weapon] AS [w]
|
|
LEFT JOIN (
|
|
SELECT [w#Owner].*
|
|
FROM [Gear] AS [w#Owner]
|
|
WHERE [w#Owner].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t] ON [w].[OwnerFullName] = [t].[FullName])
|
|
WHERE ([w].[Id] <> 50) AND ([t].[HasSoulPatch] = False)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_contains() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE (([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL) AND [t0].[SquadId] IN (
|
|
SELECT [g].[SquadId]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear')
|
|
)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_predicate_negated_complex1() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE IIf(
|
|
[t0].[HasSoulPatch] = True,
|
|
True,
|
|
[t0].[HasSoulPatch]
|
|
) <> True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_correlated_filtered_collection() :
|
|
AssertSql(
|
|
@"SELECT [g].[FullName]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND [g].[CityOrBirthName] IN ('Ephyra', 'Hanover')",
|
|
//
|
|
@"@_outer_FullName='Augustus Cole' (Nullable = false) (Size = 13)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE (([w].[Name] <> 'Lancer') OR [w].[Name] IS NULL) AND (@_outer_FullName = [w].[OwnerFullName])",
|
|
//
|
|
@"@_outer_FullName='Dominic Santiago' (Nullable = false) (Size = 16)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE (([w].[Name] <> 'Lancer') OR [w].[Name] IS NULL) AND (@_outer_FullName = [w].[OwnerFullName])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Navigation_access_on_derived_entity_using_cast() :
|
|
AssertSql(
|
|
@"SELECT [f].[Name], [t].[ThreatLevel] AS [Threat]
|
|
FROM ([Faction] AS [f]
|
|
LEFT JOIN (
|
|
SELECT [f#Commander].*
|
|
FROM [LocustLeader] AS [f#Commander]
|
|
WHERE [f#Commander].[Discriminator] = 'LocustCommander'
|
|
) AS [t] ON [f].[CommanderName] = [t].[Name])
|
|
WHERE ([f].[Discriminator] = 'LocustHorde') AND ([f].[Discriminator] = 'LocustHorde')
|
|
ORDER BY [f].[Name]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_predicate() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE (([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL) AND ([t0].[HasSoulPatch] = True)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_array_initializers() :
|
|
AssertSql(
|
|
@"SELECT [t0].[SquadId]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_projection_into_anonymous_type() :
|
|
AssertSql(
|
|
@"SELECT [t0].[SquadId]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE ([t].[Note] <> 'K.I.A.') OR [t].[Note] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Non_unicode_string_literals_is_used_for_non_unicode_column_with_subquery() :
|
|
AssertSql(
|
|
@"SELECT [c].[Name], [c].[Location]
|
|
FROM [City] AS [c]
|
|
WHERE ([c].[Location] = 'Unknown') AND ((
|
|
SELECT COUNT(*)
|
|
FROM [Gear] AS [g]
|
|
WHERE ([g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[Nickname] = 'Paduk')) AND ([c].[Name] = [g].[CityOrBirthName])
|
|
) = 1)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Optional_navigation_type_compensation_works_with_conditional_expression() :
|
|
AssertSql(
|
|
@"SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([CogTag] AS [t]
|
|
LEFT JOIN (
|
|
SELECT [t#Gear].*
|
|
FROM [Gear] AS [t#Gear]
|
|
WHERE [t#Gear].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId]))
|
|
WHERE IIf(
|
|
[t0].[HasSoulPatch] = True,
|
|
True,
|
|
False
|
|
) = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_null_propagation_negative1() :
|
|
AssertSql(
|
|
@"SELECT IIf(
|
|
[g].[LeaderNickname] IS NOT NULL,
|
|
IIf(
|
|
CInt(IIf(IsNull(Len([g].[Nickname])),0,Len([g].[Nickname]))) = 5,
|
|
True,
|
|
False
|
|
),
|
|
NULL
|
|
)
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Null_propagation_optimization6() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (CInt(IIf(IsNull(Len([g].[LeaderNickname])),0,Len([g].[LeaderNickname]))) = 5)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Null_propagation_optimization4() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (CInt(IIf(IsNull(Len([g].[LeaderNickname])),0,Len([g].[LeaderNickname]))) = 5)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Non_unicode_string_literals_is_used_for_non_unicode_column_with_contains() :
|
|
AssertSql(
|
|
@"SELECT [c].[Name], [c].[Location]
|
|
FROM [City] AS [c]
|
|
WHERE Instr(1, [c].[Location], 'Jacinto', 0) > 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_ternary_operation_multiple_conditions() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], IIf(
|
|
([w].[AmmunitionType] = 2) AND ([w].[SynergyWithId] = 1),
|
|
'Yes',
|
|
'No'
|
|
) AS [IsCartidge]
|
|
FROM [Weapon] AS [w]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Collection_with_inheritance_and_join_include_joined() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank], [g#Tag].[Id], [g#Tag].[GearNickName], [g#Tag].[GearSquadId], [g#Tag].[Note]
|
|
FROM (([CogTag] AS [t]
|
|
INNER JOIN [Gear] AS [g] ON ([t].[GearSquadId] = [g].[SquadId]) AND ([t].[GearNickName] = [g].[Nickname]))
|
|
LEFT JOIN [CogTag] AS [g#Tag] ON ([g].[Nickname] = [g#Tag].[GearNickName]) AND ([g].[SquadId] = [g#Tag].[GearSquadId]))
|
|
WHERE [g].[Discriminator] = 'Officer'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Collection_with_inheritance_and_join_include_source() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank], [g#Tag].[Id], [g#Tag].[GearNickName], [g#Tag].[GearSquadId], [g#Tag].[Note]
|
|
FROM (([Gear] AS [g]
|
|
LEFT JOIN [CogTag] AS [g#Tag] ON ([g].[Nickname] = [g#Tag].[GearNickName]) AND ([g].[SquadId] = [g#Tag].[GearSquadId]))
|
|
INNER JOIN [CogTag] AS [t] ON ([g].[SquadId] = [t].[GearSquadId]) AND ([g].[Nickname] = [t].[GearNickName]))
|
|
WHERE [g].[Discriminator] = 'Officer'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Collection_with_inheritance_and_join_include_joined() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank], [g#Tag].[Id], [g#Tag].[GearNickName], [g#Tag].[GearSquadId], [g#Tag].[Note]
|
|
FROM (([CogTag] AS [t]
|
|
INNER JOIN [Gear] AS [g] ON ([t].[GearSquadId] = [g].[SquadId]) AND ([t].[GearNickName] = [g].[Nickname]))
|
|
LEFT JOIN [CogTag] AS [g#Tag] ON ([g].[Nickname] = [g#Tag].[GearNickName]) AND ([g].[SquadId] = [g#Tag].[GearSquadId]))
|
|
WHERE [g].[Discriminator] = 'Officer'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Count_with_optional_navigation_is_translated_to_sql() :
|
|
AssertSql(
|
|
@"SELECT COUNT(*)
|
|
FROM ([Gear] AS [g]
|
|
LEFT JOIN [CogTag] AS [g#Tag] ON ([g].[Nickname] = [g#Tag].[GearNickName]) AND ([g].[SquadId] = [g#Tag].[GearSquadId]))
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g#Tag].[Note] <> 'Foo') OR [g#Tag].[Note] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Count_with_unflattened_groupjoin_is_evaluated_on_client() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank], [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([Gear] AS [g]
|
|
LEFT JOIN [CogTag] AS [t] ON ([g].[Nickname] = [t].[GearNickName]) AND ([g].[SquadId] = [t].[GearSquadId]))
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear')
|
|
ORDER BY [g].[Nickname], [g].[SquadId]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Collection_with_inheritance_and_join_include_source() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank], [g#Tag].[Id], [g#Tag].[GearNickName], [g#Tag].[GearSquadId], [g#Tag].[Note]
|
|
FROM (([Gear] AS [g]
|
|
LEFT JOIN [CogTag] AS [g#Tag] ON ([g].[Nickname] = [g#Tag].[GearNickName]) AND ([g].[SquadId] = [g#Tag].[GearSquadId]))
|
|
INNER JOIN [CogTag] AS [t] ON ([g].[SquadId] = [t].[GearSquadId]) AND ([g].[Nickname] = [t].[GearNickName]))
|
|
WHERE [g].[Discriminator] = 'Officer'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Coalesce_operator_in_predicate_with_other_conditions() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE ([w].[AmmunitionType] = 1) AND (IIf(IsNull([w].[IsAutomatic]), False, [w].[IsAutomatic]) = True)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Distinct_with_unflattened_groupjoin_is_evaluated_on_client() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank], [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
|
|
FROM ([Gear] AS [g]
|
|
LEFT JOIN [CogTag] AS [t] ON ([g].[Nickname] = [t].[GearNickName]) AND ([g].[SquadId] = [t].[GearSquadId]))
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear')
|
|
ORDER BY [g].[Nickname], [g].[SquadId]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Collection_with_inheritance_and_join_include_joined() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank], [g#Tag].[Id], [g#Tag].[GearNickName], [g#Tag].[GearSquadId], [g#Tag].[Note]
|
|
FROM (([CogTag] AS [t]
|
|
INNER JOIN [Gear] AS [g] ON ([t].[GearSquadId] = [g].[SquadId]) AND ([t].[GearNickName] = [g].[Nickname]))
|
|
LEFT JOIN [CogTag] AS [g#Tag] ON ([g].[Nickname] = [g#Tag].[GearNickName]) AND ([g].[SquadId] = [g#Tag].[GearSquadId]))
|
|
WHERE [g].[Discriminator] = 'Officer'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Distinct_with_optional_navigation_is_translated_to_sql() :
|
|
AssertSql(
|
|
@"SELECT DISTINCT [g].[HasSoulPatch]
|
|
FROM ([Gear] AS [g]
|
|
LEFT JOIN [CogTag] AS [g#Tag] ON ([g].[Nickname] = [g#Tag].[GearNickName]) AND ([g].[SquadId] = [g#Tag].[GearSquadId]))
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g#Tag].[Note] <> 'Foo') OR [g#Tag].[Note] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Complex_predicate_with_AndAlso_and_nullable_bool_property() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM ([Weapon] AS [w]
|
|
LEFT JOIN (
|
|
SELECT [w#Owner].*
|
|
FROM [Gear] AS [w#Owner]
|
|
WHERE [w#Owner].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t] ON [w].[OwnerFullName] = [t].[FullName])
|
|
WHERE ([w].[Id] <> 50) AND ([t].[HasSoulPatch] = False)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Coalesce_operator_in_predicate() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE IIf(IsNull([w].[IsAutomatic]), False, [w].[IsAutomatic]) = True");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Coalesce_operator_in_projection_with_other_conditions() :
|
|
AssertSql(
|
|
@"SELECT IIf(
|
|
([w].[AmmunitionType] = 1) AND (IIf(IsNull([w].[IsAutomatic]), False, [w].[IsAutomatic]) = True),
|
|
True,
|
|
False
|
|
)
|
|
FROM [Weapon] AS [w]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Client_method_on_collection_navigation_in_predicate_accessed_by_ef_property() :
|
|
AssertSql(
|
|
@"SELECT [g].[FullName], [g].[Nickname]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[HasSoulPatch] = False)",
|
|
//
|
|
@"@_outer_FullName='Augustus Cole' (Nullable = false) (Size = 13)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE @_outer_FullName = [w].[OwnerFullName]",
|
|
//
|
|
@"@_outer_FullName='Dominic Santiago' (Nullable = false) (Size = 16)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE @_outer_FullName = [w].[OwnerFullName]",
|
|
//
|
|
@"@_outer_FullName='Garron Paduk' (Nullable = false) (Size = 12)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE @_outer_FullName = [w].[OwnerFullName]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Collection_with_inheritance_and_join_include_source() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank], [g#Tag].[Id], [g#Tag].[GearNickName], [g#Tag].[GearSquadId], [g#Tag].[Note]
|
|
FROM (([Gear] AS [g]
|
|
LEFT JOIN [CogTag] AS [g#Tag] ON ([g].[Nickname] = [g#Tag].[GearNickName]) AND ([g].[SquadId] = [g#Tag].[GearSquadId]))
|
|
INNER JOIN [CogTag] AS [t] ON ([g].[SquadId] = [t].[GearSquadId]) AND ([g].[Nickname] = [t].[GearNickName]))
|
|
WHERE [g].[Discriminator] = 'Officer'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Collection_with_inheritance_and_join_include_joined() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank], [g#Tag].[Id], [g#Tag].[GearNickName], [g#Tag].[GearSquadId], [g#Tag].[Note]
|
|
FROM (([CogTag] AS [t]
|
|
INNER JOIN [Gear] AS [g] ON ([t].[GearSquadId] = [g].[SquadId]) AND ([t].[GearNickName] = [g].[Nickname]))
|
|
LEFT JOIN [CogTag] AS [g#Tag] ON ([g].[Nickname] = [g#Tag].[GearNickName]) AND ([g].[SquadId] = [g#Tag].[GearSquadId]))
|
|
WHERE [g].[Discriminator] = 'Officer'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Complex_predicate_with_AndAlso_and_nullable_bool_property() :
|
|
AssertSql(
|
|
@"SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM ([Weapon] AS [w]
|
|
LEFT JOIN (
|
|
SELECT [w#Owner].*
|
|
FROM [Gear] AS [w#Owner]
|
|
WHERE [w#Owner].[Discriminator] IN ('Officer', 'Gear')
|
|
) AS [t] ON [w].[OwnerFullName] = [t].[FullName])
|
|
WHERE ([w].[Id] <> 50) AND ([t].[HasSoulPatch] = False)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Non_unicode_parameter_is_used_for_non_unicode_column() :
|
|
AssertSql(
|
|
@"@__value_0='Unknown' (Nullable = false) (Size = 7)
|
|
|
|
SELECT [c].[Name], [c].[Location]
|
|
FROM [City] AS [c]
|
|
WHERE [c].[Location] = @__value_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.DateTimeOffset_Date_works() :
|
|
AssertSql(
|
|
@"@__Date_0='01/01/0001 00:00:00' (DbType = DateTime)
|
|
|
|
SELECT [m].[Id], [m].[CodeName], [m].[Timeline]
|
|
FROM [Mission] AS [m]
|
|
WHERE IIf(IsNull([m].[Timeline]), NULL, DateValue([m].[Timeline])) > @__Date_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.DateTimeOffset_Datepart_works() :
|
|
AssertSql(
|
|
@"SELECT [m].[Id], [m].[CodeName], [m].[Timeline]
|
|
FROM [Mission] AS [m]
|
|
WHERE DatePart('m', [m].[Timeline]) = 5");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.DateTimeOffset_Date_works() :
|
|
AssertSql(
|
|
@"@__Date_0='01/01/0001 00:00:00' (DbType = DateTime)
|
|
|
|
SELECT [m].[Id], [m].[CodeName], [m].[Timeline]
|
|
FROM [Mission] AS [m]
|
|
WHERE IIf(IsNull([m].[Timeline]), NULL, DateValue([m].[Timeline])) > @__Date_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_correlated_filtered_collection_works_with_caching() :
|
|
AssertSql(
|
|
@"SELECT [t].[GearNickName]
|
|
FROM [CogTag] AS [t]",
|
|
//
|
|
@"@_outer_GearNickName='Marcus' (Nullable = false) (Size = 6)
|
|
|
|
SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[Nickname] = @_outer_GearNickName)",
|
|
//
|
|
@"@_outer_GearNickName='Baird' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[Nickname] = @_outer_GearNickName)",
|
|
//
|
|
@"@_outer_GearNickName='Paduk' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[Nickname] = @_outer_GearNickName)",
|
|
//
|
|
@"@_outer_GearNickName='Cole Train' (Nullable = false) (Size = 10)
|
|
|
|
SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[Nickname] = @_outer_GearNickName)",
|
|
//
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND [g].[Nickname] IS NULL",
|
|
//
|
|
@"@_outer_GearNickName='Dom' (Nullable = false) (Size = 3)
|
|
|
|
SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[Nickname] = @_outer_GearNickName)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_correlated_filtered_collection_with_composite_key() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] = 'Officer'",
|
|
//
|
|
@"@_outer_Nickname='Baird' (Nullable = false) (Size = 5)
|
|
@_outer_SquadId='1'
|
|
|
|
SELECT [r].[Nickname], [r].[SquadId], [r].[AssignedCityName], [r].[CityOrBirthName], [r].[Discriminator], [r].[FullName], [r].[HasSoulPatch], [r].[LeaderNickname], [r].[LeaderSquadId], [r].[Rank]
|
|
FROM [Gear] AS [r]
|
|
WHERE ([r].[Discriminator] IN ('Officer', 'Gear') AND ([r].[Nickname] <> 'Dom')) AND ((@_outer_Nickname = [r].[LeaderNickname]) AND (@_outer_SquadId = [r].[LeaderSquadId]))",
|
|
//
|
|
@"@_outer_Nickname='Marcus' (Nullable = false) (Size = 6)
|
|
@_outer_SquadId='1'
|
|
|
|
SELECT [r].[Nickname], [r].[SquadId], [r].[AssignedCityName], [r].[CityOrBirthName], [r].[Discriminator], [r].[FullName], [r].[HasSoulPatch], [r].[LeaderNickname], [r].[LeaderSquadId], [r].[Rank]
|
|
FROM [Gear] AS [r]
|
|
WHERE ([r].[Discriminator] IN ('Officer', 'Gear') AND ([r].[Nickname] <> 'Dom')) AND ((@_outer_Nickname = [r].[LeaderNickname]) AND (@_outer_SquadId = [r].[LeaderSquadId]))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_length_of_string_property() :
|
|
AssertSql(
|
|
@"SELECT [w].[Name], CInt(IIf(IsNull(Len([w].[Name])),0,Len([w].[Name]))) AS [Length]
|
|
FROM [Weapon] AS [w]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Select_correlated_filtered_collection() :
|
|
AssertSql(
|
|
@"SELECT [g].[FullName]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND [g].[CityOrBirthName] IN ('Ephyra', 'Hanover')",
|
|
//
|
|
@"@_outer_FullName='Augustus Cole' (Nullable = false) (Size = 13)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE (([w].[Name] <> 'Lancer') OR [w].[Name] IS NULL) AND (@_outer_FullName = [w].[OwnerFullName])",
|
|
//
|
|
@"@_outer_FullName='Dominic Santiago' (Nullable = false) (Size = 16)
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE (([w].[Name] <> 'Lancer') OR [w].[Name] IS NULL) AND (@_outer_FullName = [w].[OwnerFullName])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Subquery_containing_SelectMany_projecting_main_from_clause_gets_lifted() :
|
|
AssertSql(
|
|
@"SELECT [gear].[FullName]
|
|
FROM [Gear] AS [gear]
|
|
, [CogTag] AS [tag]
|
|
WHERE [gear].[Discriminator] IN ('Officer', 'Gear') AND ([gear].[HasSoulPatch] = True)
|
|
ORDER BY [gear].[FullName], [tag].[Note]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_enum_has_flag_with_non_nullable_parameter() :
|
|
AssertSql(
|
|
@"@__parameter_0='Corporal'
|
|
|
|
SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND @__parameter_0) = @__parameter_0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_has_flag_with_nullable_parameter() :
|
|
AssertSql(
|
|
@"@__parameter_0='Corporal'
|
|
|
|
SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND @__parameter_0) = @__parameter_0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_enum_has_flag() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND 1) = 1)",
|
|
//
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND 5) = 5)",
|
|
//
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND 1) = 1)",
|
|
//
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND 1) = 1)",
|
|
//
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ((1 BAND [g].[Rank]) = [g].[Rank])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_nullable_enum_with_nullable_parameter() :
|
|
AssertSql(
|
|
@"@__ammunitionType_0='Cartridge'
|
|
|
|
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[AmmunitionType] = @__ammunitionType_0",
|
|
//
|
|
@"SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [w].[AmmunitionType] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Subquery_is_not_lifted_from_additional_from_clause() :
|
|
AssertSql(
|
|
@"SELECT [g1].[FullName] AS [Name1]
|
|
FROM [Gear] AS [g1]
|
|
WHERE [g1].[Discriminator] IN ('Officer', 'Gear') AND ([g1].[HasSoulPatch] = True)
|
|
ORDER BY [g1].[FullName]",
|
|
//
|
|
@"SELECT [g0].[HasSoulPatch], [g0].[FullName]
|
|
FROM [Gear] AS [g0]
|
|
WHERE [g0].[Discriminator] IN ('Officer', 'Gear')
|
|
ORDER BY [g0].[Rank]",
|
|
//
|
|
@"SELECT [g0].[HasSoulPatch], [g0].[FullName]
|
|
FROM [Gear] AS [g0]
|
|
WHERE [g0].[Discriminator] IN ('Officer', 'Gear')
|
|
ORDER BY [g0].[Rank]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_count_subquery_without_collision() :
|
|
AssertSql(
|
|
@"SELECT [w].[Nickname], [w].[SquadId], [w].[AssignedCityName], [w].[CityOrBirthName], [w].[Discriminator], [w].[FullName], [w].[HasSoulPatch], [w].[LeaderNickname], [w].[LeaderSquadId], [w].[Rank]
|
|
FROM [Gear] AS [w]
|
|
WHERE [w].[Discriminator] IN ('Officer', 'Gear') AND ((
|
|
SELECT COUNT(*)
|
|
FROM [Weapon] AS [w0]
|
|
WHERE [w].[FullName] = [w0].[OwnerFullName]
|
|
) = 2)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_subquery_boolean() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ((
|
|
SELECT TOP 1 [w].[IsAutomatic]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [g].[FullName] = [w].[OwnerFullName]
|
|
) = True)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Subquery_is_lifted_from_main_from_clause_of_SelectMany() :
|
|
AssertSql(
|
|
@"SELECT [g].[FullName] AS [Name1], [g2].[FullName] AS [Name2]
|
|
FROM [Gear] AS [g]
|
|
, [Gear] AS [g2]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[HasSoulPatch] = True) AND ([g2].[HasSoulPatch] = False))
|
|
ORDER BY [g].[FullName], [g].[Rank]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Subquery_with_result_operator_is_not_lifted() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT [t].[FullName]
|
|
FROM (
|
|
SELECT TOP @__p_0 [g].*
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ([g].[HasSoulPatch] = False)
|
|
ORDER BY [g].[FullName]
|
|
) AS [t]
|
|
ORDER BY [t].[Rank]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_enum_has_flag_subquery() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND (([g].[Rank] BAND (
|
|
SELECT TOP 1 [x].[Rank]
|
|
FROM [Gear] AS [x]
|
|
WHERE [x].[Discriminator] IN ('Officer', 'Gear')
|
|
ORDER BY [x].[Nickname], [x].[SquadId]
|
|
)) = (
|
|
SELECT TOP 1 [x].[Rank]
|
|
FROM [Gear] AS [x]
|
|
WHERE [x].[Discriminator] IN ('Officer', 'Gear')
|
|
ORDER BY [x].[Nickname], [x].[SquadId]
|
|
))",
|
|
//
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ((1 BAND (
|
|
SELECT TOP 1 [x].[Rank]
|
|
FROM [Gear] AS [x]
|
|
WHERE [x].[Discriminator] IN ('Officer', 'Gear')
|
|
ORDER BY [x].[Nickname], [x].[SquadId]
|
|
)) = (
|
|
SELECT TOP 1 [x].[Rank]
|
|
FROM [Gear] AS [x]
|
|
WHERE [x].[Discriminator] IN ('Officer', 'Gear')
|
|
ORDER BY [x].[Nickname], [x].[SquadId]
|
|
))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Subquery_is_not_lifted_from_additional_from_clause() :
|
|
AssertSql(
|
|
@"SELECT [g1].[FullName] AS [Name1]
|
|
FROM [Gear] AS [g1]
|
|
WHERE [g1].[Discriminator] IN ('Officer', 'Gear') AND ([g1].[HasSoulPatch] = True)
|
|
ORDER BY [g1].[FullName]",
|
|
//
|
|
@"SELECT [g0].[HasSoulPatch], [g0].[FullName]
|
|
FROM [Gear] AS [g0]
|
|
WHERE [g0].[Discriminator] IN ('Officer', 'Gear')
|
|
ORDER BY [g0].[Rank]",
|
|
//
|
|
@"SELECT [g0].[HasSoulPatch], [g0].[FullName]
|
|
FROM [Gear] AS [g0]
|
|
WHERE [g0].[Discriminator] IN ('Officer', 'Gear')
|
|
ORDER BY [g0].[Rank]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.GearsOfWarQueryJetTest.Where_subquery_boolean() :
|
|
AssertSql(
|
|
@"SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOrBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
|
|
FROM [Gear] AS [g]
|
|
WHERE [g].[Discriminator] IN ('Officer', 'Gear') AND ((
|
|
SELECT TOP 1 [w].[IsAutomatic]
|
|
FROM [Weapon] AS [w]
|
|
WHERE [g].[FullName] = [w].[OwnerFullName]
|
|
) = True)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_multiple_references_multi_level(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice], [o#Product].[ProductID], [o#Product].[Discontinued], [o#Product].[ProductName], [o#Product].[UnitPrice], [o#Product].[UnitsInStock], [o#Order].[OrderID], [o#Order].[CustomerID], [o#Order].[EmployeeID], [o#Order].[OrderDate], [o#Order#Customer].[CustomerID], [o#Order#Customer].[Address], [o#Order#Customer].[City], [o#Order#Customer].[CompanyName], [o#Order#Customer].[ContactName], [o#Order#Customer].[ContactTitle], [o#Order#Customer].[Country], [o#Order#Customer].[Fax], [o#Order#Customer].[Phone], [o#Order#Customer].[PostalCode], [o#Order#Customer].[Region]
|
|
FROM ((([Order Details] AS [o]
|
|
INNER JOIN [Products] AS [o#Product] ON [o].[ProductID] = [o#Product].[ProductID])
|
|
INNER JOIN [Orders] AS [o#Order] ON [o].[OrderID] = [o#Order].[OrderID])
|
|
LEFT JOIN [Customers] AS [o#Order#Customer] ON [o#Order].[CustomerID] = [o#Order#Customer].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Where_subquery_on_navigation_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [o4].[OrderID]
|
|
FROM [Orders] AS [o4]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o2].[OrderID]
|
|
FROM [Orders] AS [o2]
|
|
WHERE @_outer_CustomerID = [o2].[CustomerID]",
|
|
//
|
|
@"SELECT [o4].[OrderID]
|
|
FROM [Orders] AS [o4]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o2].[OrderID]
|
|
FROM [Orders] AS [o2]
|
|
WHERE @_outer_CustomerID = [o2].[CustomerID]",
|
|
//
|
|
@"SELECT [o4].[OrderID]
|
|
FROM [Orders] AS [o4]",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o2].[OrderID]
|
|
FROM [Orders] AS [o2]
|
|
WHERE @_outer_CustomerID = [o2].[CustomerID]",
|
|
//
|
|
@"SELECT [o4].[OrderID]
|
|
FROM [Orders] AS [o4]",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o2].[OrderID]
|
|
FROM [Orders] AS [o2]
|
|
WHERE @_outer_CustomerID = [o2].[CustomerID]");
|
|
|
|
Output truncated.
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_multiple_references_multi_level(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice], [o#Product].[ProductID], [o#Product].[Discontinued], [o#Product].[ProductName], [o#Product].[UnitPrice], [o#Product].[UnitsInStock], [o#Order].[OrderID], [o#Order].[CustomerID], [o#Order].[EmployeeID], [o#Order].[OrderDate], [o#Order#Customer].[CustomerID], [o#Order#Customer].[Address], [o#Order#Customer].[City], [o#Order#Customer].[CompanyName], [o#Order#Customer].[ContactName], [o#Order#Customer].[ContactTitle], [o#Order#Customer].[Country], [o#Order#Customer].[Fax], [o#Order#Customer].[Phone], [o#Order#Customer].[PostalCode], [o#Order#Customer].[Region]
|
|
FROM ((([Order Details] AS [o]
|
|
INNER JOIN [Products] AS [o#Product] ON [o].[ProductID] = [o#Product].[ProductID])
|
|
INNER JOIN [Orders] AS [o#Order] ON [o].[OrderID] = [o#Order].[OrderID])
|
|
LEFT JOIN [Customers] AS [o#Order#Customer] ON [o#Order].[CustomerID] = [o#Order#Customer].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Navigations() :
|
|
AssertSql(
|
|
@"SELECT [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM ([Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Collection_select_nav_prop_first_or_default_then_nav_prop() :
|
|
AssertSql(
|
|
@"SELECT [e].[CustomerID]
|
|
FROM [Customers] AS [e]
|
|
WHERE [e].[CustomerID] LIKE 'A' + '%' AND (LEFT([e].[CustomerID], Len('A')) = 'A')
|
|
ORDER BY [e].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [e#Customer].[CustomerID], [e#Customer].[Address], [e#Customer].[City], [e#Customer].[CompanyName], [e#Customer].[ContactName], [e#Customer].[ContactTitle], [e#Customer].[Country], [e#Customer].[Fax], [e#Customer].[Phone], [e#Customer].[PostalCode], [e#Customer].[Region]
|
|
FROM ([Orders] AS [e0]
|
|
LEFT JOIN [Customers] AS [e#Customer] ON [e0].[CustomerID] = [e#Customer].[CustomerID])
|
|
WHERE [e0].[OrderID] IN (10643, 10692, 10702, 10835, 10952, 11011) AND (@_outer_CustomerID = [e0].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [e#Customer].[CustomerID], [e#Customer].[Address], [e#Customer].[City], [e#Customer].[CompanyName], [e#Customer].[ContactName], [e#Customer].[ContactTitle], [e#Customer].[Country], [e#Customer].[Fax], [e#Customer].[Phone], [e#Customer].[PostalCode], [e#Customer].[Region]
|
|
FROM ([Orders] AS [e0]
|
|
LEFT JOIN [Customers] AS [e#Customer] ON [e0].[CustomerID] = [e#Customer].[CustomerID])
|
|
WHERE [e0].[OrderID] IN (10643, 10692, 10702, 10835, 10952, 11011) AND (@_outer_CustomerID = [e0].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [e#Customer].[CustomerID], [e#Customer].[Address], [e#Customer].[City], [e#Customer].[CompanyName], [e#Customer].[ContactName], [e#Customer].[ContactTitle], [e#Customer].[Country], [e#Customer].[Fax], [e#Customer].[Phone], [e#Customer].[PostalCode], [e#Customer].[Region]
|
|
FROM ([Orders] AS [e0]
|
|
LEFT JOIN [Customers] AS [e#Customer] ON [e0].[CustomerID] = [e#Customer].[CustomerID])
|
|
WHERE [e0].[OrderID] IN (10643, 10692, 10702, 10835, 10952, 11011) AND (@_outer_CustomerID = [e0].[CustomerID])",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [e#Customer].[CustomerID], [e#Customer].[Address], [e#Customer].[City], [e#Customer].[CompanyName], [e#Customer].[ContactName], [e#Customer].[ContactTitle], [e#Customer].[Country], [e#Customer].[Fax], [e#Customer].[Phone], [e#Customer].[PostalCode], [e#Customer].[Region]
|
|
FROM ([Orders] AS [e0]
|
|
LEFT JOIN [Customers] AS [e#Customer] ON [e0].[CustomerID] = [e#Customer].[CustomerID])
|
|
WHERE [e0].[OrderID] IN (10643, 10692, 10702, 10835, 10952, 11011) AND (@_outer_CustomerID = [e0].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Navigation_fk_based_inside_contains() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] IN ('ALFKI')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_additional_from_clause(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region]
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].*
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t]
|
|
, [Customers] AS [c2]
|
|
ORDER BY [c2].[CustomerID]",
|
|
//
|
|
@"@__p_0='5'
|
|
|
|
SELECT [c2#Orders].[OrderID], [c2#Orders].[CustomerID], [c2#Orders].[EmployeeID], [c2#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c2#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c20].[CustomerID]
|
|
FROM (
|
|
SELECT TOP @__p_0 [c0].*
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t0]
|
|
, [Customers] AS [c20]
|
|
) AS [t1] ON [c2#Orders].[CustomerID] = [t1].[CustomerID])
|
|
ORDER BY [t1].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersJetTest.Compiled_query() :
|
|
AssertSql(
|
|
@"@__customerID='BERGS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = @__customerID",
|
|
//
|
|
@"@__customerID='BLAUS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = @__customerID");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation_Equals_Navigation() :
|
|
AssertSql(
|
|
@"SELECT [o1].[OrderID], [o1].[CustomerID], [o1].[EmployeeID], [o1].[OrderDate], [o2].[OrderID], [o2].[CustomerID], [o2].[EmployeeID], [o2].[OrderDate]
|
|
FROM [Orders] AS [o1]
|
|
, [Orders] AS [o2]
|
|
WHERE ([o1].[CustomerID] = [o2].[CustomerID]) OR ([o1].[CustomerID] IS NULL AND [o2].[CustomerID] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Collection_where_nav_prop_all() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE NOT EXISTS (
|
|
SELECT 1
|
|
FROM [Orders] AS [o]
|
|
WHERE ([c].[CustomerID] = [o].[CustomerID]) AND (([o].[CustomerID] <> 'ALFKI') OR [o].[CustomerID] IS NULL))");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Navigation_inside_contains_nested() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM (([Order Details] AS [od]
|
|
INNER JOIN [Orders] AS [od#Order] ON [od].[OrderID] = [od#Order].[OrderID])
|
|
LEFT JOIN [Customers] AS [od#Order#Customer] ON [od#Order].[CustomerID] = [od#Order#Customer].[CustomerID])
|
|
WHERE [od#Order#Customer].[City] IN ('Novigrad', 'Seattle')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_alias_generation(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"SELECT [o#OrderDetails].[OrderID], [o#OrderDetails].[ProductID], [o#OrderDetails].[Discount], [o#OrderDetails].[Quantity], [o#OrderDetails].[UnitPrice]
|
|
FROM ([Order Details] AS [o#OrderDetails]
|
|
INNER JOIN (
|
|
SELECT [o0].[OrderID]
|
|
FROM [Orders] AS [o0]
|
|
) AS [t] ON [o#OrderDetails].[OrderID] = [t].[OrderID])
|
|
ORDER BY [t].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.FiltersJetTest.Include_query_opt_out() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Join_with_nav_projected_in_subquery_when_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [od0].[OrderID], [od0].[ProductID], [od0].[Discount], [od0].[Quantity], [od0].[UnitPrice], [od#Product0].[ProductID], [od#Product0].[Discontinued], [od#Product0].[ProductName], [od#Product0].[UnitPrice], [od#Product0].[UnitsInStock]
|
|
FROM ([Order Details] AS [od0]
|
|
INNER JOIN [Products] AS [od#Product0] ON [od0].[ProductID] = [od#Product0].[ProductID])",
|
|
//
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate], [o#Customer0].[CustomerID], [o#Customer0].[Address], [o#Customer0].[City], [o#Customer0].[CompanyName], [o#Customer0].[ContactName], [o#Customer0].[ContactTitle], [o#Customer0].[Country], [o#Customer0].[Fax], [o#Customer0].[Phone], [o#Customer0].[PostalCode], [o#Customer0].[Region]
|
|
FROM ([Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID])",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.GroupJoin_with_nav_projected_in_subquery_when_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [od0].[OrderID], [od0].[ProductID], [od0].[Discount], [od0].[Quantity], [od0].[UnitPrice], [od#Product0].[ProductID], [od#Product0].[Discontinued], [od#Product0].[ProductName], [od#Product0].[UnitPrice], [od#Product0].[UnitsInStock]
|
|
FROM ([Order Details] AS [od0]
|
|
INNER JOIN [Products] AS [od#Product0] ON [od0].[ProductID] = [od#Product0].[ProductID])",
|
|
//
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate], [o#Customer0].[CustomerID], [o#Customer0].[Address], [o#Customer0].[City], [o#Customer0].[CompanyName], [o#Customer0].[ContactName], [o#Customer0].[ContactTitle], [o#Customer0].[Country], [o#Customer0].[Fax], [o#Customer0].[Phone], [o#Customer0].[PostalCode], [o#Customer0].[Region]
|
|
FROM ([Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID])",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_collection_navigation_simple() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] LIKE 'A' + '%' AND (LEFT([c].[CustomerID], Len('A')) = 'A')
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] LIKE 'A' + '%' AND (LEFT([c0].[CustomerID], Len('A')) = 'A')
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Collection_where_nav_prop_all_client() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BERGS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BLAUS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BLONP' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BOLID' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]");
|
|
|
|
Output truncated.
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Navigations_Where_Navigations() :
|
|
AssertSql(
|
|
@"SELECT [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM ([Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID])
|
|
WHERE ([o#Customer].[City] = 'Seattle') AND (([o#Customer].[Phone] <> '555 555 5555') OR [o#Customer].[Phone] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Singleton_Navigation_With_Member_Access() :
|
|
AssertSql(
|
|
@"SELECT [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City] AS [B], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM ([Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID])
|
|
WHERE ([o#Customer].[City] = 'Seattle') AND (([o#Customer].[Phone] <> '555 555 5555') OR [o#Customer].[Phone] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Navigation() :
|
|
AssertSql(
|
|
@"SELECT [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM ([Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_alias_generation(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice], [o#Order].[OrderID], [o#Order].[CustomerID], [o#Order].[EmployeeID], [o#Order].[OrderDate]
|
|
FROM ([Order Details] AS [o]
|
|
INNER JOIN [Orders] AS [o#Order] ON [o].[OrderID] = [o#Order].[OrderID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Join_with_nav_in_orderby_in_subquery_when_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [od0].[OrderID], [od0].[ProductID], [od0].[Discount], [od0].[Quantity], [od0].[UnitPrice], [od#Product0].[ProductID], [od#Product0].[Discontinued], [od#Product0].[ProductName], [od#Product0].[UnitPrice], [od#Product0].[UnitsInStock]
|
|
FROM ([Order Details] AS [od0]
|
|
INNER JOIN [Products] AS [od#Product0] ON [od0].[ProductID] = [od#Product0].[ProductID])",
|
|
//
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate], [o#Customer0].[CustomerID], [o#Customer0].[Address], [o#Customer0].[City], [o#Customer0].[CompanyName], [o#Customer0].[ContactName], [o#Customer0].[ContactTitle], [o#Customer0].[Country], [o#Customer0].[Fax], [o#Customer0].[Phone], [o#Customer0].[PostalCode], [o#Customer0].[Region]
|
|
FROM ([Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID])",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation_Contains() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID])
|
|
WHERE Instr(1, [o#Customer].[City], 'Sea', 0) > 0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID])
|
|
WHERE [o#Customer].[City] = 'Seattle'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Include_with_multiple_optional_navigations() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice], [od#Order].[OrderID], [od#Order].[CustomerID], [od#Order].[EmployeeID], [od#Order].[OrderDate], [od#Order#Customer].[CustomerID], [od#Order#Customer].[Address], [od#Order#Customer].[City], [od#Order#Customer].[CompanyName], [od#Order#Customer].[ContactName], [od#Order#Customer].[ContactTitle], [od#Order#Customer].[Country], [od#Order#Customer].[Fax], [od#Order#Customer].[Phone], [od#Order#Customer].[PostalCode], [od#Order#Customer].[Region]
|
|
FROM (([Order Details] AS [od]
|
|
INNER JOIN [Orders] AS [od#Order] ON [od].[OrderID] = [od#Order].[OrderID])
|
|
LEFT JOIN [Customers] AS [od#Order#Customer] ON [od#Order].[CustomerID] = [od#Order#Customer].[CustomerID])
|
|
WHERE [od#Order#Customer].[City] = 'London'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_join_clause_with_order_by_and_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM ([Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[City], [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c0].[CustomerID], [c0].[City]
|
|
FROM ([Customers] AS [c0]
|
|
INNER JOIN [Orders] AS [o0] ON [c0].[CustomerID] = [o0].[CustomerID])
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[City], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_join_clause_with_order_by_and_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM ([Customers] AS [c]
|
|
INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID])
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[City], [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c0].[CustomerID], [c0].[City]
|
|
FROM ([Customers] AS [c0]
|
|
INNER JOIN [Orders] AS [o0] ON [c0].[CustomerID] = [o0].[CustomerID])
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[City], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_dependent_already_tracked_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_dependent_already_tracked_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.GroupJoin_with_nav_in_orderby_in_subquery_when_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [od0].[OrderID], [od0].[ProductID], [od0].[Discount], [od0].[Quantity], [od0].[UnitPrice], [od#Product0].[ProductID], [od#Product0].[Discontinued], [od#Product0].[ProductName], [od#Product0].[UnitPrice], [od#Product0].[UnitsInStock]
|
|
FROM ([Order Details] AS [od0]
|
|
INNER JOIN [Products] AS [od#Product0] ON [od0].[ProductID] = [od#Product0].[ProductID])",
|
|
//
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate], [o#Customer0].[CustomerID], [o#Customer0].[Address], [o#Customer0].[City], [o#Customer0].[CompanyName], [o#Customer0].[ContactName], [o#Customer0].[ContactTitle], [o#Customer0].[Country], [o#Customer0].[Fax], [o#Customer0].[Phone], [o#Customer0].[PostalCode], [o#Customer0].[Region]
|
|
FROM ([Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID])",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Take_Select_Navigation() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Let_group_by_nav_prop() :
|
|
AssertSql(
|
|
@"SELECT [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice], [od#Order].[CustomerID] AS [customer]
|
|
FROM ([Order Details] AS [od]
|
|
INNER JOIN [Orders] AS [od#Order] ON [od].[OrderID] = [od#Order].[OrderID])
|
|
ORDER BY [od#Order].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation_Included() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM ([Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID])
|
|
WHERE [o#Customer].[City] = 'Seattle'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_then_include_collection(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID], [c#Orders].[OrderID]",
|
|
//
|
|
@"SELECT [c#Orders#OrderDetails].[OrderID], [c#Orders#OrderDetails].[ProductID], [c#Orders#OrderDetails].[Discount], [c#Orders#OrderDetails].[Quantity], [c#Orders#OrderDetails].[UnitPrice]
|
|
FROM ([Order Details] AS [c#Orders#OrderDetails]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c#Orders0].[OrderID], [t0].[CustomerID]
|
|
FROM ([Orders] AS [c#Orders0]
|
|
INNER JOIN (
|
|
SELECT [c1].[CustomerID]
|
|
FROM [Customers] AS [c1]
|
|
) AS [t0] ON [c#Orders0].[CustomerID] = [t0].[CustomerID])
|
|
) AS [t1] ON [c#Orders#OrderDetails].[OrderID] = [t1].[OrderID])
|
|
ORDER BY [t1].[CustomerID], [t1].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Join_with_nav_in_predicate_in_subquery_when_client_eval() :
|
|
AssertSql(
|
|
@"SELECT [od0].[OrderID], [od0].[ProductID], [od0].[Discount], [od0].[Quantity], [od0].[UnitPrice], [od#Product0].[ProductID], [od#Product0].[Discontinued], [od#Product0].[ProductName], [od#Product0].[UnitPrice], [od#Product0].[UnitsInStock]
|
|
FROM ([Order Details] AS [od0]
|
|
INNER JOIN [Products] AS [od#Product0] ON [od0].[ProductID] = [od#Product0].[ProductID])",
|
|
//
|
|
@"SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate], [o#Customer0].[CustomerID], [o#Customer0].[Address], [o#Customer0].[City], [o#Customer0].[CompanyName], [o#Customer0].[ContactName], [o#Customer0].[ContactTitle], [o#Customer0].[Country], [o#Customer0].[Fax], [o#Customer0].[Phone], [o#Customer0].[PostalCode], [o#Customer0].[Region]
|
|
FROM ([Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID])",
|
|
//
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation_Client() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM ([Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_order_by_non_key_with_first_or_default(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CompanyName] DESC, [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID], [c0].[CompanyName]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CompanyName] DESC, [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CompanyName] DESC, [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_order_by_non_key_with_first_or_default(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CompanyName] DESC, [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID], [c0].[CompanyName]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CompanyName] DESC, [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CompanyName] DESC, [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_with_filter_reordered(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM ([Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID])
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_with_filter_reordered(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM ([Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID])
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Skip_Select_Navigation() :
|
|
AssertSql(
|
|
@"@__p_0='20'
|
|
|
|
SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
SKIP @__p_0",
|
|
//
|
|
@"@_outer_CustomerID='FAMIA' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID='FISSA' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID='FOLIG' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID='FOLKO' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID='FRANK' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID='FRANR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID='FRANS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"@_outer_CustomerID='FURIB' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]
|
|
ORDER BY [o].[OrderID]");
|
|
|
|
Output truncated.
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Navigation_inside_contains() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID])
|
|
WHERE [o#Customer].[City] IN ('Novigrad', 'Seattle')");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_collection_FirstOrDefault_project_anonymous_type() :
|
|
AssertSql(
|
|
@"@__p_0='2'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[CustomerID], [o].[OrderID]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[CustomerID], [o].[OrderID]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation_Multiple_Access() :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM ([Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID])
|
|
WHERE ([o#Customer].[City] = 'Seattle') AND (([o#Customer].[Phone] <> '555 555 5555') OR [o#Customer].[Phone] IS NULL)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_take_no_order_by(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@__p_0='10'
|
|
|
|
SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_take_no_order_by(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@__p_0='10'
|
|
|
|
SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Collection_select_nav_prop_first_or_default() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BERGS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BLAUS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BLONP' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BOLID' (Nullable = false) (Size = 5)
|
|
|
|
SELECT TOP 1 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE @_outer_CustomerID = [o].[CustomerID]");
|
|
|
|
Output truncated.
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Collection_select_nav_prop_all_client() :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ALFKI' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANATR' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='ANTON' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='AROUT' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BERGS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BLAUS' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BLONP' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]",
|
|
//
|
|
@"@_outer_CustomerID='BOLID' (Nullable = false) (Size = 5)
|
|
|
|
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
|
|
FROM [Orders] AS [o0]
|
|
WHERE @_outer_CustomerID = [o0].[CustomerID]");
|
|
|
|
Output truncated.
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation_Deep() :
|
|
AssertSql(
|
|
@"@__p_0='1'
|
|
|
|
SELECT TOP @__p_0 [od].[OrderID], [od].[ProductID], [od].[Discount], [od].[Quantity], [od].[UnitPrice]
|
|
FROM (([Order Details] AS [od]
|
|
INNER JOIN [Orders] AS [od#Order] ON [od].[OrderID] = [od#Order].[OrderID])
|
|
LEFT JOIN [Customers] AS [od#Order#Customer] ON [od#Order].[CustomerID] = [od#Order#Customer].[CustomerID])
|
|
WHERE [od#Order#Customer].[City] = 'Seattle'
|
|
ORDER BY [od].[OrderID], [od].[ProductID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryNavigationsJetTest.Select_Where_Navigation_Null_Deep() :
|
|
AssertSql(
|
|
@"SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title]
|
|
FROM ([Employees] AS [e]
|
|
LEFT JOIN [Employees] AS [e#Manager] ON [e].[ReportsTo] = [e#Manager].[EmployeeID])
|
|
WHERE [e#Manager].[ReportsTo] IS NULL");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_filter_reordered(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_filter_reordered(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_and_collection(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM ([Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID])
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"SELECT [o#OrderDetails].[OrderID], [o#OrderDetails].[ProductID], [o#OrderDetails].[Discount], [o#OrderDetails].[Quantity], [o#OrderDetails].[UnitPrice]
|
|
FROM ([Order Details] AS [o#OrderDetails]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [o0].[OrderID]
|
|
FROM ([Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID])
|
|
) AS [t] ON [o#OrderDetails].[OrderID] = [t].[OrderID])
|
|
ORDER BY [t].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_and_collection(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM ([Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID])
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"SELECT [o#OrderDetails].[OrderID], [o#OrderDetails].[ProductID], [o#OrderDetails].[Discount], [o#OrderDetails].[Quantity], [o#OrderDetails].[UnitPrice]
|
|
FROM ([Order Details] AS [o#OrderDetails]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [o0].[OrderID]
|
|
FROM ([Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID])
|
|
) AS [t] ON [o#OrderDetails].[OrderID] = [t].[OrderID])
|
|
ORDER BY [t].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_when_groupby(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[City], [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[City], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_when_groupby(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[City], [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[City], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_last_no_orderby(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID] DESC",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID] DESC
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_last_no_orderby(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID] DESC",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID] DESC
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_order_by_non_key(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[City], [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[City], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_order_by_non_key(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[City], [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[City], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_principal_already_tracked_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_principal_already_tracked_as_no_tracking(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_multiple_references(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice], [o#Product].[ProductID], [o#Product].[Discontinued], [o#Product].[ProductName], [o#Product].[UnitPrice], [o#Product].[UnitsInStock], [o#Order].[OrderID], [o#Order].[CustomerID], [o#Order].[EmployeeID], [o#Order].[OrderDate]
|
|
FROM (([Order Details] AS [o]
|
|
INNER JOIN [Products] AS [o#Product] ON [o].[ProductID] = [o#Product].[ProductID])
|
|
INNER JOIN [Orders] AS [o#Order] ON [o].[OrderID] = [o#Order].[OrderID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.QueryJetTest.Query_expression_with_to_string_and_contains() :
|
|
AssertSql(
|
|
@"SELECT [o].[CustomerID]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderDate] IS NOT NULL AND (Instr(1, IIf(IsNull([o].[EmployeeID]), NULL, CStr([o].[EmployeeID])), '10', 0) > 0)");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_dependent_already_tracked(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_dependent_already_tracked(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_list(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
ORDER BY [p].[ProductID]",
|
|
//
|
|
@"SELECT [p#OrderDetails].[OrderID], [p#OrderDetails].[ProductID], [p#OrderDetails].[Discount], [p#OrderDetails].[Quantity], [p#OrderDetails].[UnitPrice], [o#Order].[OrderID], [o#Order].[CustomerID], [o#Order].[EmployeeID], [o#Order].[OrderDate]
|
|
FROM (([Order Details] AS [p#OrderDetails]
|
|
INNER JOIN [Orders] AS [o#Order] ON [p#OrderDetails].[OrderID] = [o#Order].[OrderID])
|
|
INNER JOIN (
|
|
SELECT [p0].[ProductID]
|
|
FROM [Products] AS [p0]
|
|
) AS [t] ON [p#OrderDetails].[ProductID] = [t].[ProductID])
|
|
ORDER BY [t].[ProductID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_list(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[UnitPrice], [p].[UnitsInStock]
|
|
FROM [Products] AS [p]
|
|
ORDER BY [p].[ProductID]",
|
|
//
|
|
@"SELECT [p#OrderDetails].[OrderID], [p#OrderDetails].[ProductID], [p#OrderDetails].[Discount], [p#OrderDetails].[Quantity], [p#OrderDetails].[UnitPrice], [o#Order].[OrderID], [o#Order].[CustomerID], [o#Order].[EmployeeID], [o#Order].[OrderDate]
|
|
FROM (([Order Details] AS [p#OrderDetails]
|
|
INNER JOIN [Orders] AS [o#Order] ON [p#OrderDetails].[OrderID] = [o#Order].[OrderID])
|
|
INNER JOIN (
|
|
SELECT [p0].[ProductID]
|
|
FROM [Products] AS [p0]
|
|
) AS [t] ON [p#OrderDetails].[ProductID] = [t].[ProductID])
|
|
ORDER BY [t].[ProductID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_multiple_references_multi_level_reverse(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice], [o#Order].[OrderID], [o#Order].[CustomerID], [o#Order].[EmployeeID], [o#Order].[OrderDate], [o#Order#Customer].[CustomerID], [o#Order#Customer].[Address], [o#Order#Customer].[City], [o#Order#Customer].[CompanyName], [o#Order#Customer].[ContactName], [o#Order#Customer].[ContactTitle], [o#Order#Customer].[Country], [o#Order#Customer].[Fax], [o#Order#Customer].[Phone], [o#Order#Customer].[PostalCode], [o#Order#Customer].[Region], [o#Product].[ProductID], [o#Product].[Discontinued], [o#Product].[ProductName], [o#Product].[UnitPrice], [o#Product].[UnitsInStock]
|
|
FROM ((([Order Details] AS [o]
|
|
INNER JOIN [Orders] AS [o#Order] ON [o].[OrderID] = [o#Order].[OrderID])
|
|
LEFT JOIN [Customers] AS [o#Order#Customer] ON [o#Order].[CustomerID] = [o#Order#Customer].[CustomerID])
|
|
INNER JOIN [Products] AS [o#Product] ON [o].[ProductID] = [o#Product].[ProductID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_multiple_references_multi_level_reverse(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice], [o#Order].[OrderID], [o#Order].[CustomerID], [o#Order].[EmployeeID], [o#Order].[OrderDate], [o#Order#Customer].[CustomerID], [o#Order#Customer].[Address], [o#Order#Customer].[City], [o#Order#Customer].[CompanyName], [o#Order#Customer].[ContactName], [o#Order#Customer].[ContactTitle], [o#Order#Customer].[Country], [o#Order#Customer].[Fax], [o#Order#Customer].[Phone], [o#Order#Customer].[PostalCode], [o#Order#Customer].[Region], [o#Product].[ProductID], [o#Product].[Discontinued], [o#Product].[ProductName], [o#Product].[UnitPrice], [o#Product].[UnitsInStock]
|
|
FROM ((([Order Details] AS [o]
|
|
INNER JOIN [Orders] AS [o#Order] ON [o].[OrderID] = [o#Order].[OrderID])
|
|
LEFT JOIN [Customers] AS [o#Order#Customer] ON [o#Order].[CustomerID] = [o#Order#Customer].[CustomerID])
|
|
INNER JOIN [Products] AS [o#Product] ON [o].[ProductID] = [o#Product].[ProductID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_conditional_order_by(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(
|
|
[c].[CustomerID] LIKE 'S' + '%' AND (LEFT([c].[CustomerID], Len('S')) = 'S'),
|
|
1,
|
|
2
|
|
), [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID], IIf(
|
|
[c0].[CustomerID] LIKE 'S' + '%' AND (LEFT([c0].[CustomerID], Len('S')) = 'S'),
|
|
1,
|
|
2
|
|
) AS [c]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[c], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_conditional_order_by(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY IIf(
|
|
[c].[CustomerID] LIKE 'S' + '%' AND (LEFT([c].[CustomerID], Len('S')) = 'S'),
|
|
1,
|
|
2
|
|
), [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID], IIf(
|
|
[c0].[CustomerID] LIKE 'S' + '%' AND (LEFT([c0].[CustomerID], Len('S')) = 'S'),
|
|
1,
|
|
2
|
|
) AS [c]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[c], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_references_multi_level(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice], [o#Order].[OrderID], [o#Order].[CustomerID], [o#Order].[EmployeeID], [o#Order].[OrderDate], [o#Order#Customer].[CustomerID], [o#Order#Customer].[Address], [o#Order#Customer].[City], [o#Order#Customer].[CompanyName], [o#Order#Customer].[ContactName], [o#Order#Customer].[ContactTitle], [o#Order#Customer].[Country], [o#Order#Customer].[Fax], [o#Order#Customer].[Phone], [o#Order#Customer].[PostalCode], [o#Order#Customer].[Region]
|
|
FROM (([Order Details] AS [o]
|
|
INNER JOIN [Orders] AS [o#Order] ON [o].[OrderID] = [o#Order].[OrderID])
|
|
LEFT JOIN [Customers] AS [o#Order#Customer] ON [o#Order].[CustomerID] = [o#Order#Customer].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_references_multi_level(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice], [o#Order].[OrderID], [o#Order].[CustomerID], [o#Order].[EmployeeID], [o#Order].[OrderDate], [o#Order#Customer].[CustomerID], [o#Order#Customer].[Address], [o#Order#Customer].[City], [o#Order#Customer].[CompanyName], [o#Order#Customer].[ContactName], [o#Order#Customer].[ContactTitle], [o#Order#Customer].[Country], [o#Order#Customer].[Fax], [o#Order#Customer].[Phone], [o#Order#Customer].[PostalCode], [o#Order#Customer].[Region]
|
|
FROM (([Order Details] AS [o]
|
|
INNER JOIN [Orders] AS [o#Order] ON [o].[OrderID] = [o#Order].[OrderID])
|
|
LEFT JOIN [Customers] AS [o#Order#Customer] ON [o#Order].[CustomerID] = [o#Order#Customer].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_order_by_key(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_order_by_key(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_as_no_tracking2(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@__p_0='5'
|
|
|
|
SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_as_no_tracking2(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"@__p_0='5'
|
|
|
|
SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_principal_already_tracked(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_principal_already_tracked(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'",
|
|
//
|
|
@"SELECT TOP 2 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_with_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM ([Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID])
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference_with_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM ([Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID])
|
|
WHERE [o].[CustomerID] = 'ALFKI'");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_with_skip(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='80'
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName], [c].[CustomerID]
|
|
SKIP @__p_0",
|
|
//
|
|
@"@__p_0='80'
|
|
|
|
SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID], [c0].[ContactName]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[ContactName], [c0].[CustomerID]
|
|
SKIP @__p_0
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[ContactName], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_with_skip(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='80'
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactName], [c].[CustomerID]
|
|
SKIP @__p_0",
|
|
//
|
|
@"@__p_0='80'
|
|
|
|
SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID], [c0].[ContactName]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[ContactName], [c0].[CustomerID]
|
|
SKIP @__p_0
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[ContactName], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_additional_from_clause2(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT [t].[CustomerID], [t].[Address], [t].[City], [t].[CompanyName], [t].[ContactName], [t].[ContactTitle], [t].[Country], [t].[Fax], [t].[Phone], [t].[PostalCode], [t].[Region]
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t]
|
|
, [Customers] AS [c2]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_additional_from_clause2(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='5'
|
|
|
|
SELECT [t].[CustomerID], [t].[Address], [t].[City], [t].[CompanyName], [t].[ContactName], [t].[ContactTitle], [t].[Country], [t].[Fax], [t].[Phone], [t].[PostalCode], [t].[Region]
|
|
FROM (
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
) AS [t]
|
|
, [Customers] AS [c2]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_multi_level_collection_and_then_include_reference_predicate(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderID] = 10248
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"SELECT [o#OrderDetails].[OrderID], [o#OrderDetails].[ProductID], [o#OrderDetails].[Discount], [o#OrderDetails].[Quantity], [o#OrderDetails].[UnitPrice], [o#Product].[ProductID], [o#Product].[Discontinued], [o#Product].[ProductName], [o#Product].[UnitPrice], [o#Product].[UnitsInStock]
|
|
FROM (([Order Details] AS [o#OrderDetails]
|
|
INNER JOIN [Products] AS [o#Product] ON [o#OrderDetails].[ProductID] = [o#Product].[ProductID])
|
|
INNER JOIN (
|
|
SELECT TOP 1 [o0].[OrderID]
|
|
FROM [Orders] AS [o0]
|
|
WHERE [o0].[OrderID] = 10248
|
|
ORDER BY [o0].[OrderID]
|
|
) AS [t] ON [o#OrderDetails].[OrderID] = [t].[OrderID])
|
|
ORDER BY [t].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_multi_level_collection_and_then_include_reference_predicate(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
|
|
FROM [Orders] AS [o]
|
|
WHERE [o].[OrderID] = 10248
|
|
ORDER BY [o].[OrderID]",
|
|
//
|
|
@"SELECT [o#OrderDetails].[OrderID], [o#OrderDetails].[ProductID], [o#OrderDetails].[Discount], [o#OrderDetails].[Quantity], [o#OrderDetails].[UnitPrice], [o#Product].[ProductID], [o#Product].[Discontinued], [o#Product].[ProductName], [o#Product].[UnitPrice], [o#Product].[UnitsInStock]
|
|
FROM (([Order Details] AS [o#OrderDetails]
|
|
INNER JOIN [Products] AS [o#Product] ON [o#OrderDetails].[ProductID] = [o#Product].[ProductID])
|
|
INNER JOIN (
|
|
SELECT TOP 1 [o0].[OrderID]
|
|
FROM [Orders] AS [o0]
|
|
WHERE [o0].[OrderID] = 10248
|
|
ORDER BY [o0].[OrderID]
|
|
) AS [t] ON [o#OrderDetails].[OrderID] = [t].[OrderID])
|
|
ORDER BY [t].[OrderID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_multi_level_reference_and_collection_predicate(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM ([Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID])
|
|
WHERE [o].[OrderID] = 10248
|
|
ORDER BY [o#Customer].[CustomerID]",
|
|
//
|
|
@"SELECT [o#Customer#Orders].[OrderID], [o#Customer#Orders].[CustomerID], [o#Customer#Orders].[EmployeeID], [o#Customer#Orders].[OrderDate]
|
|
FROM ([Orders] AS [o#Customer#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [t].*
|
|
FROM (
|
|
SELECT TOP 1 [o#Customer0].[CustomerID]
|
|
FROM ([Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID])
|
|
WHERE [o0].[OrderID] = 10248
|
|
ORDER BY [o#Customer0].[CustomerID]
|
|
) AS [t]
|
|
) AS [t0] ON [o#Customer#Orders].[CustomerID] = [t0].[CustomerID])
|
|
ORDER BY [t0].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_multi_level_reference_and_collection_predicate(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 2 [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM ([Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID])
|
|
WHERE [o].[OrderID] = 10248
|
|
ORDER BY [o#Customer].[CustomerID]",
|
|
//
|
|
@"SELECT [o#Customer#Orders].[OrderID], [o#Customer#Orders].[CustomerID], [o#Customer#Orders].[EmployeeID], [o#Customer#Orders].[OrderDate]
|
|
FROM ([Orders] AS [o#Customer#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [t].*
|
|
FROM (
|
|
SELECT TOP 1 [o#Customer0].[CustomerID]
|
|
FROM ([Orders] AS [o0]
|
|
LEFT JOIN [Customers] AS [o#Customer0] ON [o0].[CustomerID] = [o#Customer0].[CustomerID])
|
|
WHERE [o0].[OrderID] = 10248
|
|
ORDER BY [o#Customer0].[CustomerID]
|
|
) AS [t]
|
|
) AS [t0] ON [o#Customer#Orders].[CustomerID] = [t0].[CustomerID])
|
|
ORDER BY [t0].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM ([Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_reference(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [o#Customer].[CustomerID], [o#Customer].[Address], [o#Customer].[City], [o#Customer].[CompanyName], [o#Customer].[ContactName], [o#Customer].[ContactTitle], [o#Customer].[Country], [o#Customer].[Fax], [o#Customer].[Phone], [o#Customer].[PostalCode], [o#Customer].[Region]
|
|
FROM ([Orders] AS [o]
|
|
LEFT JOIN [Customers] AS [o#Customer] ON [o].[CustomerID] = [o#Customer].[CustomerID])");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_references_and_collection_multi_level(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice], [o#Order].[OrderID], [o#Order].[CustomerID], [o#Order].[EmployeeID], [o#Order].[OrderDate], [o#Order#Customer].[CustomerID], [o#Order#Customer].[Address], [o#Order#Customer].[City], [o#Order#Customer].[CompanyName], [o#Order#Customer].[ContactName], [o#Order#Customer].[ContactTitle], [o#Order#Customer].[Country], [o#Order#Customer].[Fax], [o#Order#Customer].[Phone], [o#Order#Customer].[PostalCode], [o#Order#Customer].[Region]
|
|
FROM (([Order Details] AS [o]
|
|
INNER JOIN [Orders] AS [o#Order] ON [o].[OrderID] = [o#Order].[OrderID])
|
|
LEFT JOIN [Customers] AS [o#Order#Customer] ON [o#Order].[CustomerID] = [o#Order#Customer].[CustomerID])
|
|
ORDER BY [o#Order#Customer].[CustomerID]",
|
|
//
|
|
@"SELECT [o#Order#Customer#Orders].[OrderID], [o#Order#Customer#Orders].[CustomerID], [o#Order#Customer#Orders].[EmployeeID], [o#Order#Customer#Orders].[OrderDate]
|
|
FROM ([Orders] AS [o#Order#Customer#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [o#Order#Customer0].[CustomerID]
|
|
FROM (([Order Details] AS [o0]
|
|
INNER JOIN [Orders] AS [o#Order0] ON [o0].[OrderID] = [o#Order0].[OrderID])
|
|
LEFT JOIN [Customers] AS [o#Order#Customer0] ON [o#Order0].[CustomerID] = [o#Order#Customer0].[CustomerID])
|
|
) AS [t] ON [o#Order#Customer#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_references_and_collection_multi_level(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [o].[OrderID], [o].[ProductID], [o].[Discount], [o].[Quantity], [o].[UnitPrice], [o#Order].[OrderID], [o#Order].[CustomerID], [o#Order].[EmployeeID], [o#Order].[OrderDate], [o#Order#Customer].[CustomerID], [o#Order#Customer].[Address], [o#Order#Customer].[City], [o#Order#Customer].[CompanyName], [o#Order#Customer].[ContactName], [o#Order#Customer].[ContactTitle], [o#Order#Customer].[Country], [o#Order#Customer].[Fax], [o#Order#Customer].[Phone], [o#Order#Customer].[PostalCode], [o#Order#Customer].[Region]
|
|
FROM (([Order Details] AS [o]
|
|
INNER JOIN [Orders] AS [o#Order] ON [o].[OrderID] = [o#Order].[OrderID])
|
|
LEFT JOIN [Customers] AS [o#Order#Customer] ON [o#Order].[CustomerID] = [o#Order#Customer].[CustomerID])
|
|
ORDER BY [o#Order#Customer].[CustomerID]",
|
|
//
|
|
@"SELECT [o#Order#Customer#Orders].[OrderID], [o#Order#Customer#Orders].[CustomerID], [o#Order#Customer#Orders].[EmployeeID], [o#Order#Customer#Orders].[OrderDate]
|
|
FROM ([Orders] AS [o#Order#Customer#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [o#Order#Customer0].[CustomerID]
|
|
FROM (([Order Details] AS [o0]
|
|
INNER JOIN [Orders] AS [o#Order0] ON [o0].[OrderID] = [o#Order0].[OrderID])
|
|
LEFT JOIN [Customers] AS [o#Order#Customer0] ON [o#Order0].[CustomerID] = [o#Order#Customer0].[CustomerID])
|
|
) AS [t] ON [o#Order#Customer#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_order_by_non_key_with_take(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactTitle], [c].[CustomerID]",
|
|
//
|
|
@"@__p_0='10'
|
|
|
|
SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [c0].[CustomerID], [c0].[ContactTitle]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[ContactTitle], [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[ContactTitle], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_order_by_non_key_with_take(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[ContactTitle], [c].[CustomerID]",
|
|
//
|
|
@"@__p_0='10'
|
|
|
|
SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [c0].[CustomerID], [c0].[ContactTitle]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[ContactTitle], [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[ContactTitle], [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_last(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CompanyName] DESC, [c].[CustomerID] DESC",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID], [c0].[CompanyName]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CompanyName] DESC, [c0].[CustomerID] DESC
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CompanyName] DESC, [t].[CustomerID] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_with_last(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT TOP 1 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CompanyName] DESC, [c].[CustomerID] DESC",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP 1 [c0].[CustomerID], [c0].[CompanyName]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CompanyName] DESC, [c0].[CustomerID] DESC
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CompanyName] DESC, [t].[CustomerID] DESC");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_with_take(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[City] DESC, [c].[CustomerID]",
|
|
//
|
|
@"@__p_0='10'
|
|
|
|
SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[City] DESC, [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[City] DESC, [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_with_take(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT TOP @__p_0 [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[City] DESC, [c].[CustomerID]",
|
|
//
|
|
@"@__p_0='10'
|
|
|
|
SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT TOP @__p_0 [c0].[CustomerID], [c0].[City]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[City] DESC, [c0].[CustomerID]
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[City] DESC, [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_where_skip_take_projection(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_1='2'
|
|
@__p_0='1'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [od#Order].[CustomerID]
|
|
FROM ([Order Details] AS [od]
|
|
INNER JOIN [Orders] AS [od#Order] ON [od].[OrderID] = [od#Order].[OrderID])
|
|
WHERE [od].[Quantity] = 10
|
|
ORDER BY [od].[OrderID], [od].[ProductID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_where_skip_take_projection(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_1='2'
|
|
@__p_0='1'
|
|
|
|
SELECT TOP @__p_1+@__p_0 [od#Order].[CustomerID]
|
|
FROM ([Order Details] AS [od]
|
|
INNER JOIN [Orders] AS [od#Order] ON [od].[OrderID] = [od#Order].[OrderID])
|
|
WHERE [od].[Quantity] = 10
|
|
ORDER BY [od].[OrderID], [od].[ProductID]
|
|
SKIP @__p_0");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_skip_no_order_by(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
SKIP @__p_0",
|
|
//
|
|
@"@__p_0='10'
|
|
|
|
SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID]
|
|
SKIP @__p_0
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_skip_no_order_by(Boolean useString) :
|
|
AssertSql(
|
|
@"@__p_0='10'
|
|
|
|
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c]
|
|
ORDER BY [c].[CustomerID]
|
|
SKIP @__p_0",
|
|
//
|
|
@"@__p_0='10'
|
|
|
|
SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT [c0].[CustomerID]
|
|
FROM [Customers] AS [c0]
|
|
ORDER BY [c0].[CustomerID]
|
|
SKIP @__p_0
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_additional_from_clause_with_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c1]
|
|
, [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c0].[CustomerID]
|
|
FROM [Customers] AS [c10]
|
|
, [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|
|
EntityFramework.Jet.FunctionalTests.IncludeJetTest.Include_collection_on_additional_from_clause_with_filter(Boolean useString) :
|
|
AssertSql(
|
|
@"SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
|
|
FROM [Customers] AS [c1]
|
|
, [Customers] AS [c]
|
|
WHERE [c].[CustomerID] = 'ALFKI'
|
|
ORDER BY [c].[CustomerID]",
|
|
//
|
|
@"SELECT [c#Orders].[OrderID], [c#Orders].[CustomerID], [c#Orders].[EmployeeID], [c#Orders].[OrderDate]
|
|
FROM ([Orders] AS [c#Orders]
|
|
INNER JOIN (
|
|
SELECT DISTINCT [c0].[CustomerID]
|
|
FROM [Customers] AS [c10]
|
|
, [Customers] AS [c0]
|
|
WHERE [c0].[CustomerID] = 'ALFKI'
|
|
) AS [t] ON [c#Orders].[CustomerID] = [t].[CustomerID])
|
|
ORDER BY [t].[CustomerID]");
|
|
|
|
|
|
|