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

Support the new savepoint API #1076

Closed
roji opened this issue Apr 27, 2020 · 4 comments
Closed

Support the new savepoint API #1076

roji opened this issue Apr 27, 2020 · 4 comments

Comments

@roji
Copy link

roji commented Apr 27, 2020

Support for savepoints has been merged into EF Core via dotnet/efcore#20176, this tracks adding support on the Pomelo provider side.

This is super simple to do - simply subclass from RelationalTransaction and implement the relevant methods, following what was done for Sqlite in dotnet/efcore#20710 (SQL Server is lacking support for Release).

@lauxjpn lauxjpn added this to the 5.0.0 milestone May 1, 2020
@bgrainger
Copy link
Collaborator

The Savepoint API was added to MySqlConnector in mysql-net/MySqlConnector#775.

@roji
Copy link
Author

roji commented Aug 1, 2020

Thanks @bgrainger.

Note that since I opened this issue, I improved the default relational support so that the Pomelo provider probably doesn't need to do anything - any provider using RelationalTransaction will automatically attempt to use the standard savepoint management SQL (SAVEPOINT x, ROLLBACK TO x, RELEASE SAVEPOINT x). IIRC MySQL supports this, so apart from possibly enabling testing this should just work.

@roji
Copy link
Author

roji commented Aug 1, 2020

To expand on the above, the savepoint support in EF Core 5.0 does not rely on the new System.Data APIs being introduced to .NET 5.0 (dotnet/runtime#33397). In the future, if EF Core drops support for pre-.NET 5.0 (or cross-targets) we can have RelationalTransaction rely on the System.Data API instead of doing its own thing.

@lauxjpn
Copy link
Collaborator

lauxjpn commented Apr 10, 2021

I'll close this one, since EF Core does all the magic for us here.

@lauxjpn lauxjpn closed this as completed Apr 10, 2021
@lauxjpn lauxjpn self-assigned this Apr 22, 2021
@lauxjpn lauxjpn modified the milestones: 5.0.0, 5.0.0-alpha.1 Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants