canonical / sqlair

Friendly type mapping for SQL databases
Apache License 2.0
16 stars 8 forks source link

bugfix: race condition, statement was closed early #111

Closed letFunny closed 8 months ago

letFunny commented 9 months ago

Because the Query struct did not contain references to either Statement or DB, if either of those goes out of scope the underlying sql.Stmt was closed. If the user then proceeds to use the Query struct, the result will be an error.