cockroachdb / cockroachdb/cockroach-go
User requested rollbacks
Open
- Dominant language
- Go
- Stars
- 169
- Forks
- 78
- PR merge metrics
- No merged PRs in 30d
Description
I have a use case where I want to a dry run of the transaction, and rollback right before returning. The docs are not very clear about the preferred way to achieve this. I decided to return my own error object that I can check for to know that it isn't a real error.
It would be nicer if this library defined a special `ErrRollback` value, and if it sees that value, rollback the transaction instead of committing, and then also don't return any error to the outer function. It would simplify the error handling code a bit.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.