sqlclosecheck icon indicating copy to clipboard operation
sqlclosecheck copied to clipboard

Statements prepared in transaction do not need to be closed

Open bunyk opened this issue 4 years ago • 1 comments

Because, quoting documentation, "The statements prepared for a transaction by calling the transaction's Prepare or Stmt methods are closed by the call to Commit or Rollback.". https://pkg.go.dev/database/sql#Tx

Linter should avoid printing warnings about this.

bunyk avatar Sep 20 '21 12:09 bunyk

I'm sorry for not getting back to you sooner. Please provide a test case (example), and I will look into it.

ryanrolds avatar Aug 20 '23 19:08 ryanrolds