Open thezerobit opened 3 years ago
Sorry about not responding sooner. Please provide a test case (example), and I will look into it.
I've changed jobs since I filed this ticket and no longer have access to the source code. From memory, I think we close the statements on program exit, which is to say, not a simple defer. If you don't care about this case, feel free to close this ticket. I'm not really working in Go at this point, so I'm not going to be able to contribute here.
Prepared statements can live as long as the connection and be reused over and over and then closed much later. In that scenario, it would be nice to be able to allow prepared statements to not be closed in the same function that they are created in.