Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<EFCoreVersion>10.0.0-preview.6.25314.101</EFCoreVersion>
<MicrosoftExtensionsVersion>10.0.0-preview.6.25314.101</MicrosoftExtensionsVersion>
<EFCoreVersion>10.0.0-preview.6.25321.102</EFCoreVersion>
<MicrosoftExtensionsVersion>10.0.0-preview.6.25321.102</MicrosoftExtensionsVersion>
<NpgsqlVersion>9.0.3</NpgsqlVersion>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,39 +67,36 @@ public override async Task Contains_with_local_uint_array_closure(bool async)
""");
}

// TODO: The base implementations no longer compile since https://github.com/dotnet/runtime/pull/110197 (Contains overload added with
// optional parameter, not supported in expression trees). #35547 is tracking on the EF side.
//
// public override async Task Contains_with_local_nullable_uint_array_closure(bool async)
// {
// await base.Contains_with_local_nullable_uint_array_closure(async);
//
// // Note: PostgreSQL doesn't support uint, but value converters make this into bigint
//
// AssertSql(
// """
// @ids={ '0', '1' } (DbType = Object)
//
// SELECT e."EmployeeID", e."City", e."Country", e."FirstName", e."ReportsTo", e."Title"
// FROM "Employees" AS e
// WHERE e."EmployeeID" = ANY (@ids)
// """,
// //
// """
// @ids={ '0' } (DbType = Object)
//
// SELECT e."EmployeeID", e."City", e."Country", e."FirstName", e."ReportsTo", e."Title"
// FROM "Employees" AS e
// WHERE e."EmployeeID" = ANY (@ids)
// """);
// }
//
// public override Task Contains_with_local_anonymous_type_array_closure(bool async)
// // Aggregates. Issue #15937.
// => AssertTranslationFailed(() => base.Contains_with_local_anonymous_type_array_closure(async));
//
// public override Task Contains_with_local_tuple_array_closure(bool async)
// => Assert.ThrowsAsync<InvalidCastException>(() => base.Contains_with_local_tuple_array_closure(async: true));
public override async Task Contains_with_local_nullable_uint_array_closure(bool async)
{
await base.Contains_with_local_nullable_uint_array_closure(async);

// Note: PostgreSQL doesn't support uint, but value converters make this into bigint

AssertSql(
"""
@ids={ '0', '1' } (DbType = Object)

SELECT e."EmployeeID", e."City", e."Country", e."FirstName", e."ReportsTo", e."Title"
FROM "Employees" AS e
WHERE e."EmployeeID" = ANY (@ids)
""",
//
"""
@ids={ '0' } (DbType = Object)

SELECT e."EmployeeID", e."City", e."Country", e."FirstName", e."ReportsTo", e."Title"
FROM "Employees" AS e
WHERE e."EmployeeID" = ANY (@ids)
""");
}

public override Task Contains_with_local_anonymous_type_array_closure(bool async)
// Aggregates. Issue #15937.
=> AssertTranslationFailed(() => base.Contains_with_local_anonymous_type_array_closure(async));

public override Task Contains_with_local_tuple_array_closure(bool async)
=> Assert.ThrowsAsync<InvalidCastException>(() => base.Contains_with_local_tuple_array_closure(async: true));

public override async Task Contains_with_local_enumerable_inline(bool async)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,29 @@ public override async Task Inline_collection_of_ints_Contains(bool async)
""");
}

// TODO: The base implementations no longer compile since https://github.com/dotnet/runtime/pull/110197 (Contains overload added with
// optional parameter, not supported in expression trees). #35547 is tracking on the EF side.
//
// public override async Task Inline_collection_of_nullable_ints_Contains(bool async)
// {
// await base.Inline_collection_of_nullable_ints_Contains(async);
//
// AssertSql(
// """
// SELECT p."Id", p."Bool", p."Bools", p."DateTime", p."DateTimes", p."Enum", p."Enums", p."Int", p."Ints", p."NullableInt", p."NullableInts", p."NullableString", p."NullableStrings", p."NullableWrappedId", p."NullableWrappedIdWithNullableComparer", p."String", p."Strings", p."WrappedId"
// FROM "PrimitiveCollectionsEntity" AS p
// WHERE p."NullableInt" IN (10, 999)
// """);
// }
//
// public override async Task Inline_collection_of_nullable_ints_Contains_null(bool async)
// {
// await base.Inline_collection_of_nullable_ints_Contains_null(async);
//
// AssertSql(
// """
// SELECT p."Id", p."Bool", p."Bools", p."DateTime", p."DateTimes", p."Enum", p."Enums", p."Int", p."Ints", p."NullableInt", p."NullableInts", p."NullableString", p."NullableStrings", p."NullableWrappedId", p."NullableWrappedIdWithNullableComparer", p."String", p."Strings", p."WrappedId"
// FROM "PrimitiveCollectionsEntity" AS p
// WHERE p."NullableInt" IS NULL OR p."NullableInt" = 999
// """);
// }
public override async Task Inline_collection_of_nullable_ints_Contains(bool async)
{
await base.Inline_collection_of_nullable_ints_Contains(async);

AssertSql(
"""
SELECT p."Id", p."Bool", p."Bools", p."DateTime", p."DateTimes", p."Enum", p."Enums", p."Int", p."Ints", p."NullableInt", p."NullableInts", p."NullableString", p."NullableStrings", p."NullableWrappedId", p."NullableWrappedIdWithNullableComparer", p."String", p."Strings", p."WrappedId"
FROM "PrimitiveCollectionsEntity" AS p
WHERE p."NullableInt" IN (10, 999)
""");
}

public override async Task Inline_collection_of_nullable_ints_Contains_null(bool async)
{
await base.Inline_collection_of_nullable_ints_Contains_null(async);

AssertSql(
"""
SELECT p."Id", p."Bool", p."Bools", p."DateTime", p."DateTimes", p."Enum", p."Enums", p."Int", p."Ints", p."NullableInt", p."NullableInts", p."NullableString", p."NullableStrings", p."NullableWrappedId", p."NullableWrappedIdWithNullableComparer", p."String", p."Strings", p."WrappedId"
FROM "PrimitiveCollectionsEntity" AS p
WHERE p."NullableInt" IS NULL OR p."NullableInt" = 999
""");
}

public override async Task Inline_collection_Count_with_zero_values(bool async)
{
Expand Down Expand Up @@ -575,52 +572,49 @@ WHERE NOT (p."NullableInt" = ANY (@ints) AND p."NullableInt" = ANY (@ints) IS NO
""");
}

// TODO: The base implementations no longer compile since https://github.com/dotnet/runtime/pull/110197 (Contains overload added with
// optional parameter, not supported in expression trees). #35547 is tracking on the EF side.
//
// public override async Task Parameter_collection_of_nullable_ints_Contains_int(bool async)
// {
// await base.Parameter_collection_of_nullable_ints_Contains_int(async);
//
// AssertSql(
// """
// @nullableInts={ '10', '999' } (DbType = Object)
//
// SELECT p."Id", p."Bool", p."Bools", p."DateTime", p."DateTimes", p."Enum", p."Enums", p."Int", p."Ints", p."NullableInt", p."NullableInts", p."NullableString", p."NullableStrings", p."NullableWrappedId", p."NullableWrappedIdWithNullableComparer", p."String", p."Strings", p."WrappedId"
// FROM "PrimitiveCollectionsEntity" AS p
// WHERE p."Int" = ANY (@nullableInts)
// """,
// //
// """
// @nullableInts={ '10', '999' } (DbType = Object)
//
// SELECT p."Id", p."Bool", p."Bools", p."DateTime", p."DateTimes", p."Enum", p."Enums", p."Int", p."Ints", p."NullableInt", p."NullableInts", p."NullableString", p."NullableStrings", p."NullableWrappedId", p."NullableWrappedIdWithNullableComparer", p."String", p."Strings", p."WrappedId"
// FROM "PrimitiveCollectionsEntity" AS p
// WHERE NOT (p."Int" = ANY (@nullableInts) AND p."Int" = ANY (@nullableInts) IS NOT NULL)
// """);
// }
//
// public override async Task Parameter_collection_of_nullable_ints_Contains_nullable_int(bool async)
// {
// await base.Parameter_collection_of_nullable_ints_Contains_nullable_int(async);
//
// AssertSql(
// """
// @nullableInts={ NULL, '999' } (DbType = Object)
//
// SELECT p."Id", p."Bool", p."Bools", p."DateTime", p."DateTimes", p."Enum", p."Enums", p."Int", p."Ints", p."NullableInt", p."NullableInts", p."NullableString", p."NullableStrings", p."NullableWrappedId", p."NullableWrappedIdWithNullableComparer", p."String", p."Strings", p."WrappedId"
// FROM "PrimitiveCollectionsEntity" AS p
// WHERE p."NullableInt" = ANY (@nullableInts) OR (p."NullableInt" IS NULL AND array_position(@nullableInts, NULL) IS NOT NULL)
// """,
// //
// """
// @nullableInts={ NULL, '999' } (DbType = Object)
//
// SELECT p."Id", p."Bool", p."Bools", p."DateTime", p."DateTimes", p."Enum", p."Enums", p."Int", p."Ints", p."NullableInt", p."NullableInts", p."NullableString", p."NullableStrings", p."NullableWrappedId", p."NullableWrappedIdWithNullableComparer", p."String", p."Strings", p."WrappedId"
// FROM "PrimitiveCollectionsEntity" AS p
// WHERE NOT (p."NullableInt" = ANY (@nullableInts) AND p."NullableInt" = ANY (@nullableInts) IS NOT NULL) AND (p."NullableInt" IS NOT NULL OR array_position(@nullableInts, NULL) IS NULL)
// """);
// }
public override async Task Parameter_collection_of_nullable_ints_Contains_int(bool async)
{
await base.Parameter_collection_of_nullable_ints_Contains_int(async);

AssertSql(
"""
@nullableInts={ '10', '999' } (DbType = Object)

SELECT p."Id", p."Bool", p."Bools", p."DateTime", p."DateTimes", p."Enum", p."Enums", p."Int", p."Ints", p."NullableInt", p."NullableInts", p."NullableString", p."NullableStrings", p."NullableWrappedId", p."NullableWrappedIdWithNullableComparer", p."String", p."Strings", p."WrappedId"
FROM "PrimitiveCollectionsEntity" AS p
WHERE p."Int" = ANY (@nullableInts)
""",
//
"""
@nullableInts={ '10', '999' } (DbType = Object)

SELECT p."Id", p."Bool", p."Bools", p."DateTime", p."DateTimes", p."Enum", p."Enums", p."Int", p."Ints", p."NullableInt", p."NullableInts", p."NullableString", p."NullableStrings", p."NullableWrappedId", p."NullableWrappedIdWithNullableComparer", p."String", p."Strings", p."WrappedId"
FROM "PrimitiveCollectionsEntity" AS p
WHERE NOT (p."Int" = ANY (@nullableInts) AND p."Int" = ANY (@nullableInts) IS NOT NULL)
""");
}

public override async Task Parameter_collection_of_nullable_ints_Contains_nullable_int(bool async)
{
await base.Parameter_collection_of_nullable_ints_Contains_nullable_int(async);

AssertSql(
"""
@nullableInts={ NULL, '999' } (DbType = Object)

SELECT p."Id", p."Bool", p."Bools", p."DateTime", p."DateTimes", p."Enum", p."Enums", p."Int", p."Ints", p."NullableInt", p."NullableInts", p."NullableString", p."NullableStrings", p."NullableWrappedId", p."NullableWrappedIdWithNullableComparer", p."String", p."Strings", p."WrappedId"
FROM "PrimitiveCollectionsEntity" AS p
WHERE p."NullableInt" = ANY (@nullableInts) OR (p."NullableInt" IS NULL AND array_position(@nullableInts, NULL) IS NOT NULL)
""",
//
"""
@nullableInts={ NULL, '999' } (DbType = Object)

SELECT p."Id", p."Bool", p."Bools", p."DateTime", p."DateTimes", p."Enum", p."Enums", p."Int", p."Ints", p."NullableInt", p."NullableInts", p."NullableString", p."NullableStrings", p."NullableWrappedId", p."NullableWrappedIdWithNullableComparer", p."String", p."Strings", p."WrappedId"
FROM "PrimitiveCollectionsEntity" AS p
WHERE NOT (p."NullableInt" = ANY (@nullableInts) AND p."NullableInt" = ANY (@nullableInts) IS NOT NULL) AND (p."NullableInt" IS NOT NULL OR array_position(@nullableInts, NULL) IS NULL)
""");
}

public override async Task Parameter_collection_of_structs_Contains_struct(bool async)
{
Expand Down Expand Up @@ -760,22 +754,19 @@ public override async Task Parameter_collection_of_bools_Contains(bool async)
""");
}

// TODO: The base implementations no longer compile since https://github.com/dotnet/runtime/pull/110197 (Contains overload added with
// optional parameter, not supported in expression trees). #35547 is tracking on the EF side.
//
// public override async Task Parameter_collection_of_enums_Contains(bool async)
// {
// await base.Parameter_collection_of_enums_Contains(async);
//
// AssertSql(
// """
// @enums={ '0', '3' } (DbType = Object)
//
// SELECT p."Id", p."Bool", p."Bools", p."DateTime", p."DateTimes", p."Enum", p."Enums", p."Int", p."Ints", p."NullableInt", p."NullableInts", p."NullableString", p."NullableStrings", p."NullableWrappedId", p."NullableWrappedIdWithNullableComparer", p."String", p."Strings", p."WrappedId"
// FROM "PrimitiveCollectionsEntity" AS p
// WHERE p."Enum" = ANY (@enums)
// """);
// }
public override async Task Parameter_collection_of_enums_Contains(bool async)
{
await base.Parameter_collection_of_enums_Contains(async);

AssertSql(
"""
@enums={ '0', '3' } (DbType = Object)

SELECT p."Id", p."Bool", p."Bools", p."DateTime", p."DateTimes", p."Enum", p."Enums", p."Int", p."Ints", p."NullableInt", p."NullableInts", p."NullableString", p."NullableStrings", p."NullableWrappedId", p."NullableWrappedIdWithNullableComparer", p."String", p."Strings", p."WrappedId"
FROM "PrimitiveCollectionsEntity" AS p
WHERE p."Enum" = ANY (@enums)
""");
}

public override async Task Parameter_collection_null_Contains(bool async)
{
Expand Down Expand Up @@ -869,32 +860,29 @@ public override async Task Column_collection_of_ints_Contains(bool async)
""");
}

// TODO: The base implementations no longer compile since https://github.com/dotnet/runtime/pull/110197 (Contains overload added with
// optional parameter, not supported in expression trees). #35547 is tracking on the EF side.
//
// public override async Task Column_collection_of_nullable_ints_Contains(bool async)
// {
// await base.Column_collection_of_nullable_ints_Contains(async);
//
// AssertSql(
// """
// SELECT p."Id", p."Bool", p."Bools", p."DateTime", p."DateTimes", p."Enum", p."Enums", p."Int", p."Ints", p."NullableInt", p."NullableInts", p."NullableString", p."NullableStrings", p."NullableWrappedId", p."NullableWrappedIdWithNullableComparer", p."String", p."Strings", p."WrappedId"
// FROM "PrimitiveCollectionsEntity" AS p
// WHERE p."NullableInts" @> ARRAY[10]::integer[]
// """);
// }
//
// public override async Task Column_collection_of_nullable_ints_Contains_null(bool async)
// {
// await base.Column_collection_of_nullable_ints_Contains_null(async);
//
// AssertSql(
// """
// SELECT p."Id", p."Bool", p."Bools", p."DateTime", p."DateTimes", p."Enum", p."Enums", p."Int", p."Ints", p."NullableInt", p."NullableInts", p."NullableString", p."NullableStrings", p."NullableWrappedId", p."NullableWrappedIdWithNullableComparer", p."String", p."Strings", p."WrappedId"
// FROM "PrimitiveCollectionsEntity" AS p
// WHERE array_position(p."NullableInts", NULL) IS NOT NULL
// """);
// }
public override async Task Column_collection_of_nullable_ints_Contains(bool async)
{
await base.Column_collection_of_nullable_ints_Contains(async);

AssertSql(
"""
SELECT p."Id", p."Bool", p."Bools", p."DateTime", p."DateTimes", p."Enum", p."Enums", p."Int", p."Ints", p."NullableInt", p."NullableInts", p."NullableString", p."NullableStrings", p."NullableWrappedId", p."NullableWrappedIdWithNullableComparer", p."String", p."Strings", p."WrappedId"
FROM "PrimitiveCollectionsEntity" AS p
WHERE p."NullableInts" @> ARRAY[10]::integer[]
""");
}

public override async Task Column_collection_of_nullable_ints_Contains_null(bool async)
{
await base.Column_collection_of_nullable_ints_Contains_null(async);

AssertSql(
"""
SELECT p."Id", p."Bool", p."Bools", p."DateTime", p."DateTimes", p."Enum", p."Enums", p."Int", p."Ints", p."NullableInt", p."NullableInts", p."NullableString", p."NullableStrings", p."NullableWrappedId", p."NullableWrappedIdWithNullableComparer", p."String", p."Strings", p."WrappedId"
FROM "PrimitiveCollectionsEntity" AS p
WHERE array_position(p."NullableInts", NULL) IS NOT NULL
""");
}

public override async Task Column_collection_of_strings_contains_null(bool async)
{
Expand Down