On Monday, August 28, 2017 at 7:37:42 PM UTC+3, Tamás Gulácsi wrote: > > QueryRow closes the underlyin Stmt - see the docs.
Where in the doc this is mentioned? https://godoc.org/database/sql#Stmt.QueryRow <<QueryRow executes a prepared query statement with the given arguments. If an error occurs during the execution of the statement, that error will be returned by a call to Scan on the returned *Row, which is always non-nil. If the query selects no rows, the *Row's Scan will return ErrNoRows. Otherwise, the *Row's Scan scans the first selected row and discards the rest.>> https://godoc.org/database/sql#Tx.QueryRow <<QueryRow executes a query that is expected to return at most one row. QueryRow always returns a non-nil value. Errors are deferred until Row's Scan method is called. If the query selects no rows, the *Row's Scan will return ErrNoRows. Otherwise, the *Row's Scan scans the first selected row and discards the rest.>> I also had a quick look at the code and didn't see the statement closed (but I have not digged really into code, just a quick look). ain -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.