You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for creating this. I would love to use this tool if this supports checking transactions too. Usually, rows.Close() is something that is not missed. But I miss closing transactions often.
I would want to check that transactions are always either committed or rolled back before the function returns.
Something like
tx, err:=db.Begin()
iferr!=nil {
returnerr
}
err=doSomething()
iferr!=nil {
tx.Rollback()
returnerr
}
returnnil// error !! We are not doing tx.Commit() before returning.
Will it be possible to add something like this ? Thanks.
The text was updated successfully, but these errors were encountered:
First, this package is only for the validation of *sql.Rows.
But in the future, with other analyzers, we'll mix them to check broad use-cases of database/sql
For this reason, I'm sorry I won't implement the checker of database transaction commit in this package.
However, I definitely support this with creating another analyzer as soon as possible!
So I keep this issue opened. Thanks.
If a common pattern is eventually established for checking for closing of both Rows and Transactions then the next logical check would be closing Prepared Statements.
Hi, thanks for creating this. I would love to use this tool if this supports checking transactions too. Usually, rows.Close() is something that is not missed. But I miss closing transactions often.
I would want to check that transactions are always either committed or rolled back before the function returns.
Something like
Will it be possible to add something like this ? Thanks.
The text was updated successfully, but these errors were encountered: