We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
RollbackIfNotCommit
TxOrm
In work, I found that I write code looks like:
tx := o.Begin() // .. if err != nil { tx.Rollback() return } if err1 != nil { tx.Rollback() return. }
So I proposal that add new method named RollbackIfNotCommit, so I am able to write code like:
tx := o.Begin() defer tx.RollbackIfNotCommit // .. if err != nil { return } if err1 != nil { return. } tx.Commit()
The text was updated successfully, but these errors were encountered:
@jianzhiyao i can try
Sorry, something went wrong.
@liaoyijun I assigned it to you, :)
liaoyijun
Successfully merging a pull request may close this issue.
In work, I found that I write code looks like:
So I proposal that add new method named
RollbackIfNotCommit
, so I am able to write code like:The text was updated successfully, but these errors were encountered: