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

Use RETURNING/OUTPUT clause for UPDATE/DELETE #27663

Merged
merged 1 commit into from
Mar 18, 2022

Conversation

roji
Copy link
Member

@roji roji commented Mar 17, 2022

Closes #27547

@roji roji requested a review from AndriySvyryd March 17, 2022 15:46
@roji roji force-pushed the UpdatePipeline/UpdateDelete branch from e24ad8e to 147d9ee Compare March 17, 2022 16:33
@roji roji merged commit e1db60a into dotnet:main Mar 18, 2022
@roji roji deleted the UpdatePipeline/UpdateDelete branch March 18, 2022 12:33
@JesperTreetop
Copy link

JesperTreetop commented Nov 9, 2022

For what it's worth; this seems to break entity-driven updates to virtual tables in SQLite, like how FTS can be implemented in a popular post by @bricelam. SQLite gives the error (0x80004005): SQLite Error 1: 'UPDATE RETURNING is not available on virtual tables'. I had to replace them with a manually constructed query, run with context.Database.ExecuteSql(); that also requires some coordination with the surrounding data to make sure it's not itself pending a context save, and so on.

This problem is apt to happen for other things that rely on SQLite extensions, of which there are a few, so having a flag to opt out of this behavior would be welcome. "Another roundtrip to the database" is a lesser concern on SQLite than on other databases anyway.

@roji
Copy link
Member Author

roji commented Nov 9, 2022

@JesperTreetop thanks for raising this, I've opened #29512 to track separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use RETURNING/OUTPUT clause for UPDATE/DELETE
3 participants