sqlclosecheck icon indicating copy to clipboard operation
sqlclosecheck copied to clipboard

Support for ignoring statements from StmtContext

Open camhashemi opened this issue 4 years ago • 3 comments

from the godocs for Tx.StmtContext:

The returned statement operates within the transaction and will be closed when the transaction has been committed or rolled back.

This makes it syntactically nicer to not defer stmt.Close() when using StmtContext

Is it possible to ignore errors for these statements?

camhashemi avatar Oct 07 '20 09:10 camhashemi

Should be possible. I will look into it and see what I can do.

ryanrolds avatar Oct 25 '20 19:10 ryanrolds

Similarly, would it be possible to ignore errors inside loops? Or can you provide an example showing how to use sqlclosecheck inside a loop?

matthewcummings avatar Nov 15 '20 04:11 matthewcummings

Sorry for not following up. Over the next few weeks I will be giving this project more attention. This looks to be similar to https://github.com/ryanrolds/sqlclosecheck/issues/14. I'm counting them as two requests for not flagging unclosed transactions.

ryanrolds avatar Aug 20 '23 20:08 ryanrolds