-
Notifications
You must be signed in to change notification settings - Fork 323
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
Query supports DbConnection (hence external transactions) but Execute doesn't #301
Comments
In this case I think I have a reasonably specific and important use case - which is to be able use Massive Execute within a larger, user-controlled transaction. |
Be specific please. Breaking changes are a no-go, so if something requires a breaking change, it won't happen. Additionally, what problem does it solve? Is something not possible today, and what exactly is it, that can't be done, so that is addressed. |
I understand that a breaking change won't happen. I do think that I have a reasonably specific use case, though: I want to be able to execute Massive commands within my own, outer transaction (within which I am also doing other, non-Massive, things). That is quite specific, isn't it? |
In Massive.Shared.cs, Query has a variant which takes an open DbConnection
public virtual IEnumerable<dynamic> Query(string sql, DbConnection connection, params object[] args)
as well as a variant which creates and opens its own connectionpublic virtual IEnumerable<dynamic> Query(string sql, params object[] args)
.However Execute only has variants which do not take a DbConnection. It might make sense to add variants of (all three?) public versions of Execute which can take an open connection? It would be fairly trivial to do this by adding an optional second (in all cases) DbConnection parameter to each of these methods, but this would be a potentially breaking change to the interface (probably only in rare cases?). Possibly one for a future major version of Massive...?
The text was updated successfully, but these errors were encountered: