Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execute update sync #2476

Closed
wants to merge 3 commits into from
Closed
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
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<EFCoreVersion>7.0.0-rc.1.22417.7</EFCoreVersion>
<MicrosoftExtensionsVersion>7.0.0-rc.1.22414.6</MicrosoftExtensionsVersion>
<MicrosoftExtensionsVersion>7.0.0-rc.1.22421.2</MicrosoftExtensionsVersion>
<NpgsqlVersion>7.0.0-preview.7</NpgsqlVersion>
</PropertyGroup>

Expand Down
136 changes: 136 additions & 0 deletions EFCore.PG.sln
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,25 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Github", "Github", "{26203F
.github\dependabot.yml = .github\dependabot.yml
.github\workflows\codeql-analysis.yml = .github\workflows\codeql-analysis.yml
EndProjectSection
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EF", "EF", "{67CC4504-DA01-4DA8-A2B9-6493CD2B4F83}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EFCore", "..\efcore\src\EFCore\EFCore.csproj", "{4E4DCEC3-84F3-4416-AE02-343A3964DEAD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EFCore.Abstractions", "..\efcore\src\EFCore.Abstractions\EFCore.Abstractions.csproj", "{63C3EDDF-CF6A-41E2-BA54-6BAE0D24CED5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EFCore.Analyzers", "..\efcore\src\EFCore.Analyzers\EFCore.Analyzers.csproj", "{76329DA4-D5D3-4136-BD0D-6AC002E962C3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EFCore.Relational", "..\efcore\src\EFCore.Relational\EFCore.Relational.csproj", "{3EE0229A-85A5-4677-886D-EEBA8AB4BE69}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EFCore.SqlServer", "..\efcore\src\EFCore.SqlServer\EFCore.SqlServer.csproj", "{DFA50D41-8AB4-459F-BCDA-73239DF3BEE4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EFCore.Design", "..\efcore\src\EFCore.Design\EFCore.Design.csproj", "{6771EC7B-3B85-4A20-9A2F-ABB979745198}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EFCore.Relational.Specification.Tests", "..\efcore\test\EFCore.Relational.Specification.Tests\EFCore.Relational.Specification.Tests.csproj", "{18933973-B439-4B50-9795-B7F2E0070894}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EFCore.Specification.Tests", "..\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj", "{96C6D488-9DDB-43C9-BCDC-F2EEE56717D1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EFCore.SqlServer.FunctionalTests", "..\efcore\test\EFCore.SqlServer.FunctionalTests\EFCore.SqlServer.FunctionalTests.csproj", "{87C812E3-9397-4FB9-8E11-001E95A981CC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -104,6 +123,114 @@ Global
{D7106D61-C7CA-4005-B31F-43281BB397AD}.Release|x64.Build.0 = Release|Any CPU
{D7106D61-C7CA-4005-B31F-43281BB397AD}.Release|x86.ActiveCfg = Release|Any CPU
{D7106D61-C7CA-4005-B31F-43281BB397AD}.Release|x86.Build.0 = Release|Any CPU
{4E4DCEC3-84F3-4416-AE02-343A3964DEAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4E4DCEC3-84F3-4416-AE02-343A3964DEAD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4E4DCEC3-84F3-4416-AE02-343A3964DEAD}.Debug|x64.ActiveCfg = Debug|Any CPU
{4E4DCEC3-84F3-4416-AE02-343A3964DEAD}.Debug|x64.Build.0 = Debug|Any CPU
{4E4DCEC3-84F3-4416-AE02-343A3964DEAD}.Debug|x86.ActiveCfg = Debug|Any CPU
{4E4DCEC3-84F3-4416-AE02-343A3964DEAD}.Debug|x86.Build.0 = Debug|Any CPU
{4E4DCEC3-84F3-4416-AE02-343A3964DEAD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4E4DCEC3-84F3-4416-AE02-343A3964DEAD}.Release|Any CPU.Build.0 = Release|Any CPU
{4E4DCEC3-84F3-4416-AE02-343A3964DEAD}.Release|x64.ActiveCfg = Release|Any CPU
{4E4DCEC3-84F3-4416-AE02-343A3964DEAD}.Release|x64.Build.0 = Release|Any CPU
{4E4DCEC3-84F3-4416-AE02-343A3964DEAD}.Release|x86.ActiveCfg = Release|Any CPU
{4E4DCEC3-84F3-4416-AE02-343A3964DEAD}.Release|x86.Build.0 = Release|Any CPU
{63C3EDDF-CF6A-41E2-BA54-6BAE0D24CED5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{63C3EDDF-CF6A-41E2-BA54-6BAE0D24CED5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{63C3EDDF-CF6A-41E2-BA54-6BAE0D24CED5}.Debug|x64.ActiveCfg = Debug|Any CPU
{63C3EDDF-CF6A-41E2-BA54-6BAE0D24CED5}.Debug|x64.Build.0 = Debug|Any CPU
{63C3EDDF-CF6A-41E2-BA54-6BAE0D24CED5}.Debug|x86.ActiveCfg = Debug|Any CPU
{63C3EDDF-CF6A-41E2-BA54-6BAE0D24CED5}.Debug|x86.Build.0 = Debug|Any CPU
{63C3EDDF-CF6A-41E2-BA54-6BAE0D24CED5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{63C3EDDF-CF6A-41E2-BA54-6BAE0D24CED5}.Release|Any CPU.Build.0 = Release|Any CPU
{63C3EDDF-CF6A-41E2-BA54-6BAE0D24CED5}.Release|x64.ActiveCfg = Release|Any CPU
{63C3EDDF-CF6A-41E2-BA54-6BAE0D24CED5}.Release|x64.Build.0 = Release|Any CPU
{63C3EDDF-CF6A-41E2-BA54-6BAE0D24CED5}.Release|x86.ActiveCfg = Release|Any CPU
{63C3EDDF-CF6A-41E2-BA54-6BAE0D24CED5}.Release|x86.Build.0 = Release|Any CPU
{76329DA4-D5D3-4136-BD0D-6AC002E962C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{76329DA4-D5D3-4136-BD0D-6AC002E962C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{76329DA4-D5D3-4136-BD0D-6AC002E962C3}.Debug|x64.ActiveCfg = Debug|Any CPU
{76329DA4-D5D3-4136-BD0D-6AC002E962C3}.Debug|x64.Build.0 = Debug|Any CPU
{76329DA4-D5D3-4136-BD0D-6AC002E962C3}.Debug|x86.ActiveCfg = Debug|Any CPU
{76329DA4-D5D3-4136-BD0D-6AC002E962C3}.Debug|x86.Build.0 = Debug|Any CPU
{76329DA4-D5D3-4136-BD0D-6AC002E962C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{76329DA4-D5D3-4136-BD0D-6AC002E962C3}.Release|Any CPU.Build.0 = Release|Any CPU
{76329DA4-D5D3-4136-BD0D-6AC002E962C3}.Release|x64.ActiveCfg = Release|Any CPU
{76329DA4-D5D3-4136-BD0D-6AC002E962C3}.Release|x64.Build.0 = Release|Any CPU
{76329DA4-D5D3-4136-BD0D-6AC002E962C3}.Release|x86.ActiveCfg = Release|Any CPU
{76329DA4-D5D3-4136-BD0D-6AC002E962C3}.Release|x86.Build.0 = Release|Any CPU
{3EE0229A-85A5-4677-886D-EEBA8AB4BE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3EE0229A-85A5-4677-886D-EEBA8AB4BE69}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3EE0229A-85A5-4677-886D-EEBA8AB4BE69}.Debug|x64.ActiveCfg = Debug|Any CPU
{3EE0229A-85A5-4677-886D-EEBA8AB4BE69}.Debug|x64.Build.0 = Debug|Any CPU
{3EE0229A-85A5-4677-886D-EEBA8AB4BE69}.Debug|x86.ActiveCfg = Debug|Any CPU
{3EE0229A-85A5-4677-886D-EEBA8AB4BE69}.Debug|x86.Build.0 = Debug|Any CPU
{3EE0229A-85A5-4677-886D-EEBA8AB4BE69}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3EE0229A-85A5-4677-886D-EEBA8AB4BE69}.Release|Any CPU.Build.0 = Release|Any CPU
{3EE0229A-85A5-4677-886D-EEBA8AB4BE69}.Release|x64.ActiveCfg = Release|Any CPU
{3EE0229A-85A5-4677-886D-EEBA8AB4BE69}.Release|x64.Build.0 = Release|Any CPU
{3EE0229A-85A5-4677-886D-EEBA8AB4BE69}.Release|x86.ActiveCfg = Release|Any CPU
{3EE0229A-85A5-4677-886D-EEBA8AB4BE69}.Release|x86.Build.0 = Release|Any CPU
{DFA50D41-8AB4-459F-BCDA-73239DF3BEE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DFA50D41-8AB4-459F-BCDA-73239DF3BEE4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DFA50D41-8AB4-459F-BCDA-73239DF3BEE4}.Debug|x64.ActiveCfg = Debug|Any CPU
{DFA50D41-8AB4-459F-BCDA-73239DF3BEE4}.Debug|x64.Build.0 = Debug|Any CPU
{DFA50D41-8AB4-459F-BCDA-73239DF3BEE4}.Debug|x86.ActiveCfg = Debug|Any CPU
{DFA50D41-8AB4-459F-BCDA-73239DF3BEE4}.Debug|x86.Build.0 = Debug|Any CPU
{DFA50D41-8AB4-459F-BCDA-73239DF3BEE4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DFA50D41-8AB4-459F-BCDA-73239DF3BEE4}.Release|Any CPU.Build.0 = Release|Any CPU
{DFA50D41-8AB4-459F-BCDA-73239DF3BEE4}.Release|x64.ActiveCfg = Release|Any CPU
{DFA50D41-8AB4-459F-BCDA-73239DF3BEE4}.Release|x64.Build.0 = Release|Any CPU
{DFA50D41-8AB4-459F-BCDA-73239DF3BEE4}.Release|x86.ActiveCfg = Release|Any CPU
{DFA50D41-8AB4-459F-BCDA-73239DF3BEE4}.Release|x86.Build.0 = Release|Any CPU
{6771EC7B-3B85-4A20-9A2F-ABB979745198}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6771EC7B-3B85-4A20-9A2F-ABB979745198}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6771EC7B-3B85-4A20-9A2F-ABB979745198}.Debug|x64.ActiveCfg = Debug|Any CPU
{6771EC7B-3B85-4A20-9A2F-ABB979745198}.Debug|x64.Build.0 = Debug|Any CPU
{6771EC7B-3B85-4A20-9A2F-ABB979745198}.Debug|x86.ActiveCfg = Debug|Any CPU
{6771EC7B-3B85-4A20-9A2F-ABB979745198}.Debug|x86.Build.0 = Debug|Any CPU
{6771EC7B-3B85-4A20-9A2F-ABB979745198}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6771EC7B-3B85-4A20-9A2F-ABB979745198}.Release|Any CPU.Build.0 = Release|Any CPU
{6771EC7B-3B85-4A20-9A2F-ABB979745198}.Release|x64.ActiveCfg = Release|Any CPU
{6771EC7B-3B85-4A20-9A2F-ABB979745198}.Release|x64.Build.0 = Release|Any CPU
{6771EC7B-3B85-4A20-9A2F-ABB979745198}.Release|x86.ActiveCfg = Release|Any CPU
{6771EC7B-3B85-4A20-9A2F-ABB979745198}.Release|x86.Build.0 = Release|Any CPU
{18933973-B439-4B50-9795-B7F2E0070894}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{18933973-B439-4B50-9795-B7F2E0070894}.Debug|Any CPU.Build.0 = Debug|Any CPU
{18933973-B439-4B50-9795-B7F2E0070894}.Debug|x64.ActiveCfg = Debug|Any CPU
{18933973-B439-4B50-9795-B7F2E0070894}.Debug|x64.Build.0 = Debug|Any CPU
{18933973-B439-4B50-9795-B7F2E0070894}.Debug|x86.ActiveCfg = Debug|Any CPU
{18933973-B439-4B50-9795-B7F2E0070894}.Debug|x86.Build.0 = Debug|Any CPU
{18933973-B439-4B50-9795-B7F2E0070894}.Release|Any CPU.ActiveCfg = Release|Any CPU
{18933973-B439-4B50-9795-B7F2E0070894}.Release|Any CPU.Build.0 = Release|Any CPU
{18933973-B439-4B50-9795-B7F2E0070894}.Release|x64.ActiveCfg = Release|Any CPU
{18933973-B439-4B50-9795-B7F2E0070894}.Release|x64.Build.0 = Release|Any CPU
{18933973-B439-4B50-9795-B7F2E0070894}.Release|x86.ActiveCfg = Release|Any CPU
{18933973-B439-4B50-9795-B7F2E0070894}.Release|x86.Build.0 = Release|Any CPU
{96C6D488-9DDB-43C9-BCDC-F2EEE56717D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{96C6D488-9DDB-43C9-BCDC-F2EEE56717D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{96C6D488-9DDB-43C9-BCDC-F2EEE56717D1}.Debug|x64.ActiveCfg = Debug|Any CPU
{96C6D488-9DDB-43C9-BCDC-F2EEE56717D1}.Debug|x64.Build.0 = Debug|Any CPU
{96C6D488-9DDB-43C9-BCDC-F2EEE56717D1}.Debug|x86.ActiveCfg = Debug|Any CPU
{96C6D488-9DDB-43C9-BCDC-F2EEE56717D1}.Debug|x86.Build.0 = Debug|Any CPU
{96C6D488-9DDB-43C9-BCDC-F2EEE56717D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{96C6D488-9DDB-43C9-BCDC-F2EEE56717D1}.Release|Any CPU.Build.0 = Release|Any CPU
{96C6D488-9DDB-43C9-BCDC-F2EEE56717D1}.Release|x64.ActiveCfg = Release|Any CPU
{96C6D488-9DDB-43C9-BCDC-F2EEE56717D1}.Release|x64.Build.0 = Release|Any CPU
{96C6D488-9DDB-43C9-BCDC-F2EEE56717D1}.Release|x86.ActiveCfg = Release|Any CPU
{96C6D488-9DDB-43C9-BCDC-F2EEE56717D1}.Release|x86.Build.0 = Release|Any CPU
{87C812E3-9397-4FB9-8E11-001E95A981CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{87C812E3-9397-4FB9-8E11-001E95A981CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{87C812E3-9397-4FB9-8E11-001E95A981CC}.Debug|x64.ActiveCfg = Debug|Any CPU
{87C812E3-9397-4FB9-8E11-001E95A981CC}.Debug|x64.Build.0 = Debug|Any CPU
{87C812E3-9397-4FB9-8E11-001E95A981CC}.Debug|x86.ActiveCfg = Debug|Any CPU
{87C812E3-9397-4FB9-8E11-001E95A981CC}.Debug|x86.Build.0 = Debug|Any CPU
{87C812E3-9397-4FB9-8E11-001E95A981CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{87C812E3-9397-4FB9-8E11-001E95A981CC}.Release|Any CPU.Build.0 = Release|Any CPU
{87C812E3-9397-4FB9-8E11-001E95A981CC}.Release|x64.ActiveCfg = Release|Any CPU
{87C812E3-9397-4FB9-8E11-001E95A981CC}.Release|x64.Build.0 = Release|Any CPU
{87C812E3-9397-4FB9-8E11-001E95A981CC}.Release|x86.ActiveCfg = Release|Any CPU
{87C812E3-9397-4FB9-8E11-001E95A981CC}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -116,6 +243,15 @@ Global
{77F0608F-6D0C-481C-9108-D5176E2EAD69} = {8537E50E-CF7F-49CB-B4EF-3E2A1B11F050}
{D7106D61-C7CA-4005-B31F-43281BB397AD} = {8537E50E-CF7F-49CB-B4EF-3E2A1B11F050}
{26203F54-A3C1-43AD-A101-8F589D2D67AD} = {4A5A60DD-41B6-40BF-B677-227A921ECCC8}
{4E4DCEC3-84F3-4416-AE02-343A3964DEAD} = {67CC4504-DA01-4DA8-A2B9-6493CD2B4F83}
{63C3EDDF-CF6A-41E2-BA54-6BAE0D24CED5} = {67CC4504-DA01-4DA8-A2B9-6493CD2B4F83}
{76329DA4-D5D3-4136-BD0D-6AC002E962C3} = {67CC4504-DA01-4DA8-A2B9-6493CD2B4F83}
{3EE0229A-85A5-4677-886D-EEBA8AB4BE69} = {67CC4504-DA01-4DA8-A2B9-6493CD2B4F83}
{DFA50D41-8AB4-459F-BCDA-73239DF3BEE4} = {67CC4504-DA01-4DA8-A2B9-6493CD2B4F83}
{6771EC7B-3B85-4A20-9A2F-ABB979745198} = {67CC4504-DA01-4DA8-A2B9-6493CD2B4F83}
{18933973-B439-4B50-9795-B7F2E0070894} = {67CC4504-DA01-4DA8-A2B9-6493CD2B4F83}
{96C6D488-9DDB-43C9-BCDC-F2EEE56717D1} = {67CC4504-DA01-4DA8-A2B9-6493CD2B4F83}
{87C812E3-9397-4FB9-8E11-001E95A981CC} = {67CC4504-DA01-4DA8-A2B9-6493CD2B4F83}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F4EAAE6D-758C-4184-9D8C-7113384B61A8}
Expand Down
7 changes: 0 additions & 7 deletions global.json

This file was deleted.

1 change: 1 addition & 0 deletions global.json
3 changes: 3 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
<Feature>nullablePublicOnly</Feature>
</PropertyGroup>

<!-- Microsoft.SourceLink.GitHub causes issues when referencing EF Core via <ProjectReference /> if the versions don't match. Disable.

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>
-->
</Project>
8 changes: 7 additions & 1 deletion src/EFCore.PG/EFCore.PG.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@
<ItemGroup>
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
</ItemGroup>


<ItemGroup>
<ProjectReference Include="../../../efcore/src/EFCore/EFCore.csproj" />
<ProjectReference Include="../../../efcore/src/EFCore.Relational/EFCore.Relational.csproj" />
<ProjectReference Include="../../../efcore/src/EFCore.Abstractions/EFCore.Abstractions.csproj" />
</ItemGroup>

<ItemGroup>
<Compile Include="..\Shared\*.cs" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@ public sealed class PostgresDeleteExpression : Expression, IPrintableExpression
/// </summary>
public SqlExpression? Predicate { get; }

public PostgresDeleteExpression(TableExpression table, IReadOnlyList<TableExpressionBase> fromItems, SqlExpression? predicate)
=> (Table, FromItems, Predicate) = (table, fromItems, predicate);
/// <summary>
/// The list of tags applied to this <see cref="DeleteExpression" />.
/// </summary>
public ISet<string> Tags { get; }

public PostgresDeleteExpression(
TableExpression table, IReadOnlyList<TableExpressionBase> fromItems, SqlExpression? predicate, ISet<string> tags)
=> (Table, FromItems, Predicate, Tags) = (table, fromItems, predicate, tags);

/// <inheritdoc />
public override Type Type
Expand All @@ -36,10 +42,20 @@ protected override Expression VisitChildren(ExpressionVisitor visitor)
public PostgresDeleteExpression Update(SqlExpression? predicate)
=> predicate == Predicate
? this
: new PostgresDeleteExpression(Table, FromItems, predicate);
: new PostgresDeleteExpression(Table, FromItems, predicate, Tags);

public void Print(ExpressionPrinter expressionPrinter)
{
if (Tags.Count > 0)
{
foreach (var tag in Tags)
{
expressionPrinter.Append($"-- {tag}");
}

expressionPrinter.AppendLine();
}

expressionPrinter.AppendLine($"DELETE FROM {Table.Name} AS {Table.Alias}");

if (FromItems.Count > 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,6 @@ protected virtual Expression VisitDelete(DeleteExpression deleteExpression)
ExpressionType.AndAlso, joinPredicates, selectExpression.Predicate, typeof(bool), joinPredicates.TypeMapping)
};

return new PostgresDeleteExpression(deleteExpression.Table, fromItems, predicate);
return new PostgresDeleteExpression(deleteExpression.Table, fromItems, predicate, deleteExpression.Tags);
}
}
15 changes: 15 additions & 0 deletions src/EFCore.PG/Query/Internal/NpgsqlQuerySqlGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,21 @@ protected override Expression VisitSqlBinary(SqlBinaryExpression binary)
}
}

protected override void GenerateRootCommand(Expression queryExpression)
{
switch (queryExpression)
{
case PostgresDeleteExpression pgDeleteExpression:
GenerateTagsHeaderComment(pgDeleteExpression.Tags);
VisitPostgresDelete(pgDeleteExpression);
return;

default:
base.GenerateRootCommand(queryExpression);
return;
}
}

// NonQueryConvertingExpressionVisitor converts the relational DeleteExpression to PostgresDeleteExpression, so we should never
// get here
protected override Expression VisitDelete(DeleteExpression deleteExpression)
Expand Down
Loading