Skip to content

Commit

Permalink
Bump version to 7.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
roji committed Feb 15, 2023
1 parent dbb82d7 commit fb48afb
Show file tree
Hide file tree
Showing 8 changed files with 105 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
<ImplicitUsings>true</ImplicitUsings>
<GenerateDocumentationFile>true</GenerateDocumentationFile>

<Copyright>Copyright 2022 © The Npgsql Development Team</Copyright>
<Copyright>Copyright 2023 © The Npgsql Development Team</Copyright>
<Company>Npgsql</Company>
<VersionPrefix>7.0.2</VersionPrefix>
<VersionPrefix>7.0.3</VersionPrefix>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<PackageLicenseExpression>PostgreSQL</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/npgsql/efcore.pg</PackageProjectUrl>
Expand Down
4 changes: 2 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project>
<PropertyGroup>
<EFCoreVersion>[7.0.1,8.0.0)</EFCoreVersion>
<EFCoreVersion>[7.0.3,8.0.0)</EFCoreVersion>
<MicrosoftExtensionsVersion>7.0.0</MicrosoftExtensionsVersion>
<NpgsqlVersion>7.0.1</NpgsqlVersion>
<NpgsqlVersion>7.0.2</NpgsqlVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,30 @@ public override async Task Update_where_keyless_entity_mapped_to_sql_query(bool
AssertExecuteUpdateSql();
}

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

AssertExecuteUpdateSql(
"""
UPDATE "Drinks" AS d
SET "SugarGrams" = 0
WHERE d."Discriminator" = 'Coke'
""");
}

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

AssertExecuteUpdateSql(
"""
UPDATE "Drinks" AS d
SET "SugarGrams" = 0
WHERE d."Discriminator" = 'Coke'
""");
}

[ConditionalFact]
public virtual void Check_all_tests_overridden()
=> TestHelpers.AssertAllMethodsOverridden(GetType());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Npgsql.EntityFrameworkCore.PostgreSQL.Update;

public class NonSharedModelBulkUpdatesSqlServerTest : NonSharedModelBulkUpdatesTestBase
public class NonSharedModelBulkUpdatesNpgsqlTest : NonSharedModelBulkUpdatesTestBase
{
protected override ITestStoreFactory TestStoreFactory => NpgsqlTestStoreFactory.Instance;

Expand Down Expand Up @@ -41,6 +41,17 @@ public override async Task Delete_aggregate_root_when_table_sharing_with_non_own
AssertSql();
}

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

AssertSql(
"""
UPDATE "Owner" AS o
SET "Title" = 'SomeValue'
""");
}

public override async Task Delete_predicate_based_on_optional_navigation(bool async)
{
await base.Delete_predicate_based_on_optional_navigation(async);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public TPCInheritanceBulkUpdatesNpgsqlTest(
: base(fixture)
{
ClearLog();
// Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper);
Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper);
}

public override async Task Delete_where_hierarchy(bool async)
Expand Down Expand Up @@ -176,6 +176,28 @@ public override async Task Update_where_keyless_entity_mapped_to_sql_query(bool
AssertExecuteUpdateSql();
}

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

AssertExecuteUpdateSql(
"""
UPDATE "Coke" AS c
SET "SugarGrams" = 0
""");
}

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

AssertExecuteUpdateSql(
"""
UPDATE "Coke" AS c
SET "SugarGrams" = 0
""");
}

[ConditionalFact]
public virtual void Check_all_tests_overridden()
=> TestHelpers.AssertAllMethodsOverridden(GetType());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,20 @@ public override async Task Update_where_keyless_entity_mapped_to_sql_query(bool
AssertExecuteUpdateSql();
}

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

AssertExecuteUpdateSql();
}

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

AssertExecuteUpdateSql();
}

[ConditionalFact]
public virtual void Check_all_tests_overridden()
=> TestHelpers.AssertAllMethodsOverridden(GetType());
Expand Down
4 changes: 2 additions & 2 deletions test/EFCore.PG.FunctionalTests/Query/CitextQueryTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void StartsWith_param_pattern()

SELECT s."Id", s."CaseInsensitiveText"
FROM "SomeEntities" AS s
WHERE @__param_0 = '' OR ((s."CaseInsensitiveText" IS NOT NULL) AND (s."CaseInsensitiveText" LIKE @__param_0_1 || '%' ESCAPE '') AND left(s."CaseInsensitiveText", length(@__param_0))::citext = @__param_0::citext)
WHERE @__param_0 = '' OR ((s."CaseInsensitiveText" IS NOT NULL) AND (s."CaseInsensitiveText" LIKE @__param_0_1 || '%' ESCAPE '') AND left(s."CaseInsensitiveText", length(@__param_0_1))::citext = @__param_0_1::citext)
LIMIT 2
""");
}
Expand Down Expand Up @@ -104,7 +104,7 @@ public void EndsWith_param_pattern()

SELECT s."Id", s."CaseInsensitiveText"
FROM "SomeEntities" AS s
WHERE @__param_0 = '' OR ((s."CaseInsensitiveText" IS NOT NULL) AND right(s."CaseInsensitiveText", length(@__param_0_1))::citext = @__param_0::citext)
WHERE @__param_0 = '' OR ((s."CaseInsensitiveText" IS NOT NULL) AND right(s."CaseInsensitiveText", length(@__param_0_1))::citext = @__param_0_1::citext)
LIMIT 2
""");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,32 @@ await base.Tpc(
""");
}

public override async Task Non_sproc_followed_by_sproc_commands_in_the_same_batch(bool async)
{
await base.Non_sproc_followed_by_sproc_commands_in_the_same_batch(
async,
"""
CREATE PROCEDURE "EntityWithAdditionalProperty_Insert"(name text, OUT id int, additional_property int) LANGUAGE plpgsql AS $$
BEGIN
INSERT INTO "EntityWithAdditionalProperty" ("Name", "AdditionalProperty") VALUES (name, additional_property) RETURNING "Id" INTO id;
END $$
""");

AssertSql(
"""
@p2='1'
@p0='2'
@p3='1'
@p1='Entity1_Modified'
@p4='Entity2'
@p5='0'

UPDATE "EntityWithAdditionalProperty" SET "AdditionalProperty" = @p0, "Name" = @p1
WHERE "Id" = @p2 AND "AdditionalProperty" = @p3;
CALL "EntityWithAdditionalProperty_Insert"(@p4, NULL, @p5);
""");
}

protected override void ConfigureStoreGeneratedConcurrencyToken(EntityTypeBuilder entityTypeBuilder, string propertyName)
=> entityTypeBuilder.Property<uint?>(propertyName)
.HasColumnName("xmin")
Expand Down

0 comments on commit fb48afb

Please sign in to comment.