There are at least two places where the context handing in the QueryContext path seems suspicious.
Both fetchfn and closefn are tied to the original QueryContext which seems inconsistent with the wrapper code in database/sql (sql.go). Especially, for closefn, this likely means that an query operation can't be closed if the parent context is cancelled.
Review how other more popular drivers handle it.