cockroachdb / cockroachdb/cockroach-go
should be able to `return tx.Commit()` from closure?
Open
- Dominant language
- Go
- Stars
- 169
- Forks
- 78
- PR merge metrics
- No merged PRs in 30d
Description
> sql: Transaction has already been committed or rolled back
``` go
if err := crdb.ExecuteTx(client.DB, func(tx *sql.Tx) error {
// do stuff
return tx.Commit() // works when returning `nil`
}); err != nil {
t.Fatalf("%+v", err)
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.