-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Transactions don't return the result of the yielded block #145
Labels
Comments
I agree. I didn't consider the return value for this method. |
This was referenced Jan 31, 2021
This has sat around for a while now. I think I would like to add
|
The return value can be added to the existing method. There is no documentation for the return value. The current (nilable) boolean is accidental. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It currently returns a boolean of whether or not the transaction was committed successfully
crystal-db/src/db/begin_transaction.cr
Line 29 in eaddae7
This is different than Rails, for instance, that does return that value https://github.com/rails/rails/blob/d5386cfba2ec5c80f09e37d44b87bcae9c6ab6a8/activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#L310-L312
I would rather get the result of the block rather than the vague boolean, though I know this will be a breaking change.
The text was updated successfully, but these errors were encountered: