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

Implement ExecuteUpdate #28626

Merged
1 commit merged into from
Aug 10, 2022
Merged

Implement ExecuteUpdate #28626

1 commit merged into from
Aug 10, 2022

Conversation

smitpatel
Copy link
Member

Resolves #795

@smitpatel smitpatel marked this pull request as ready for review August 9, 2022 00:08
@smitpatel smitpatel requested a review from a team August 9, 2022 00:09
Copy link
Member

@roji roji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great @smitpatel.

I'm assuming you want to keep working (pushdown to PK subquery, EF.Property, EF.Default, tests...), but if you want to merge let me know and I'll approve.

I'll start a PG-side PR against this as well.

src/EFCore.Relational/Query/NonQueryExpression.cs Outdated Show resolved Hide resolved
src/EFCore.Relational/Query/NonQueryExpression.cs Outdated Show resolved Hide resolved
src/EFCore.Relational/Query/NonQueryExpression.cs Outdated Show resolved Hide resolved
src/EFCore.Relational/Query/SqlNullabilityProcessor.cs Outdated Show resolved Hide resolved
@smitpatel
Copy link
Member Author

Will be iterating over this PR. Wanted to get it out for review because I added docs for everything (and new exception points for ExecuteUpdate). Thanks for the review on those.

I will be adding more test, at least covering the same scenarios as Delete and few more for EF.Property/EF.Default/Multi-property.

Wrt pushdown into subquery, it is not that straightforward for update, as the values could be using values from other tables, so if we push it down into subquery like Delete then we don't have access to those values. Trying to think of some way to rewrite to get filtering and values both.

@smitpatel
Copy link
Member Author

Pending items, EF.Default & allowing joins & converting unsupported structure.

@smitpatel smitpatel requested review from roji and a team August 10, 2022 20:58
Copy link
Member

@roji roji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, forgot to submit this review.

@ghost
Copy link

ghost commented Aug 10, 2022

Hello @smitpatel!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost
Copy link

ghost commented Aug 10, 2022

Apologies, while this PR appears ready to be merged, I've been configured to only merge when all checks have explicitly passed. The following integrations have not reported any progress on their checks and are blocking auto-merge:

  1. Azure Pipelines

These integrations are possibly never going to report a check, and unblocking auto-merge likely requires a human being to update my configuration to exempt these integrations from requiring a passing check.

Give feedback on this
From the bot dev team

We've tried to tune the bot such that it posts a comment like this only when auto-merge is blocked for exceptional, non-intuitive reasons. When the bot's auto-merge capability is properly configured, auto-merge should operate as you would intuitively expect and you should not see any spurious comments.

Please reach out to us at fabricbotservices@microsoft.com to provide feedback if you believe you're seeing this comment appear spuriously. Please note that we usually are unable to update your bot configuration on your team's behalf, but we're happy to help you identify your bot admin.

@ghost ghost merged commit 299c17b into main Aug 10, 2022
@ghost ghost deleted the smit/executeupdate branch August 10, 2022 23:29
@pantonis
Copy link

pantonis commented Jun 21, 2023

This is a very very important feature. I have been using it since day 1. Made our life much much easier along with ExecuteDelete Thank you EFCore team

@roji
Copy link
Member

roji commented Jun 21, 2023

Thanks for the positive feedback @pantonis, really good to know that this is useful for people!

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ExecuteUpdate/Delete (AKA bulk update, without loading data into memory)
3 participants